According to Geoff Hutchison:
> On Thu, 1 Jun 2000, hsinclai wrote:
> > Sorry -- I didn't express this very well. There are about 10 scripts in
> > the /etc/cron.daily directory. I was under the impression that cron would
> > wait for the parent PID of the first script to exit before launching the
> > next one. Perhaps this is not the case, I'll have to research it. I am
> > guessing that one of my rundig scripts had not fully finished before the
> > next one was launched by cron.
> 
> No, most cron daemons are very simplistic. It's like setting an alarm--it
> will go off regardless of whether it should or not. :-)
> 
> It would be lovely if a cron program did this, or was smart enough to
> realize it missed some runs during a power outage or whatnot. Until that
> time... [Note, I'm not volunteering to write a cron daemon that does this.
> I just don't have the time.]

Well, there's two different issues here.  First is the operation of cron
itself, and second is how the /etc/cron.daily directory is managed.  Yes,
cron does start jobs just like an alarm clock, without making sure the
previous iteration had finished.  So, if a job may take too long, it's
up to the job itself to do its own lockouts if it would be a problem to
start another instance of itself before the previous one finishes.

However, on Red Hat Linux, and probably on other distributions as well,
there are jobs like the following:

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

So, if run-parts /etc/cron.daily takes more than a full 24 hours to run,
you will get overlap.  However, you shouldn't get overlap of the various
parts, as they are run in sequence, so long as the whole sequence runs
to completion before it begins again.  The run-parts program, at least
on Red Hat, is just a shell script that runs all the executable files
in the specified directory, in alphabetical order.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.

Reply via email to