|
Posted by Toby Inkster on 09/23/06 22:24
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.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|