[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PROPOSAL to serialize cron.{daily,weekly,monthly}



On 04-Sep-04, 20:45 (CDT), Abdullah Ramazanoglu <ar018@yahoo.com> wrote: 
> Current Situation:
> cron.daily, cron.weekly, and cron.monthly gets triggered off at specific
> times (everyday at 6:25, Sunday at 6:47 and 1st of the month at 6:52,
> respectively) regardless of whether previous batch of maintenance scripts
> has finished or not. This may result in parallel execution of scripts from
> several batches, although each batch in itself is serialized. This, in
> turn, can cause consequences ranging from wrong output to fatal script
> clash. For instance a script from cron.daily might be scanning the volumes
> for viruses, while a script from cron.weekly kicks in, force-unmounts
> several volumes (killing the processes using those volumes BTW) and starts
> backing up them. Examples are endless.

Yes, one can always put together a system to screw one's self. Don't do
that.

Your complicated solution doesn't account for other crontabs (in
/etc/cron.d, or root's user crontab). So it doesn't solve the problem.

In your solution, if a script at the daily level hangs, the ones at
higher levels will never run.

On a side note, running the jobs under 'nice' has been discussed, and
determined to be a bad idea for many systems, as it causes jobs that
scan disks to run a *lot* longer. 

Of course, none of the above prevents you from doing whatever you want
on your systems. That's why they're conffiles.

(BTW, I don't have a strong objection to the basics of this proposal, I
just don't think it's worth the effort. If the general consensus is that
chaining the daily->weekly->monthly jobs is a good idea, I'll happily
make the changes in the cron package.)

Regards,
Steve

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net



Reply to: