You are here: Re: Multiple jobs from single cron. « PHP Programming Language « IT news, forums, messages
Re: Multiple jobs from single cron.

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация