|
Posted by Paul Lautman on 09/24/06 15:51
Toby Inkster wrote:
> Paul Lautman wrote:
>
>> Now I could just include the jobs into the one cron job, but if one
>> abended for any reason, then the second one wouldn't run.
>
> That's not the case.
>
> If you run:
>
> command 1; command 2; command 3
>
> then command 2 will run regardless of whether command 1 was
> successful or not; and command 3 will run regardless of whether
> either or both of the previous commands were successful.
>
> What you may be thinking of is:
>
> command 1 && command 2 && command 3
>
> which means only run command 2 if command 1 is successful, and only
> run command 3 if command 2 is.
>
> The third way of stringing together multiple commands into one is:
>
> command 1 & command 2 & command 3
>
> which will behave more or less the same as the first example, but it
> will run the commands in parallel instead of in serial.
I wasn't aware that I could do that with the commands, but I still don't
think it'l help. I only have a very simple interface into the cron file. I
can specify one command only and I suspect that the command length of the
interfac is restricted.
When I spoke of including the jobs in one, I was meaning running a php
script with includes in it.
What I'd really like is to have the php script that was run by cron, run
more scripts whose names it would get from a database table.
Navigation:
[Reply to this message]
|