Hi,

On Mon, 5 Jun 2000, Gilles Detillieux wrote:

> 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:

Oh, yes, we see that...

> 01 * * * * root run-parts /etc/cron.hourly
> 02 4 * * * root run-parts /etc/cron.daily
 
Now when this runs ^^^ is when I thought htdig was stepping on ITSELF when
all the scripts in /etc/cron.daily get run with no regard to whether the
previous one finished yet.


> 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,

re Vixie cron, I am still not sure of this...

> 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.

I finished the script to get multiple custom rundigs out of cron.daily,
but I must test it out over the next 2 days. If it works, I'll post it for
your kind comments.

-Harold


------------------------------------
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