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

Re: cron not updating -> errors

A nasty idea, but workable: after removing the cron.d entry, save the time
from $SECONDS, and prompt the user with something like "I need to wait 60
seconds for changes to the system cron schedule to take effect, OK? (Y/n)"
and then just sleep whatever remaining number of seconds are necessary to
allow cron a chance to see the change when it checks every 60 seconds.

Short of this, I think you are going to have to resort to doing an
explicit restart of cron with "/etc/init.d/cron restart" -- but this has
policy implications and also should at least check with the user first.  I
don't think there is any really good solution unless cron implements an
immediate reload command, say with a -HUP signal, and this could be tied
to the current unusued "/etc/init.d/cron reload" option.

-- Mike

On 2000-05-06 at 20:04 +0200, Santiago Garcia Mantinan wrote:

> Yes, and as I have the cron.d entry as a conffile, when I do a --purge the
> cron.d entry is removed, and at the next time it was due to be executed,
> cron tries to execute the program, even though the entry in cron.d is not
> there anymore, that causes the error :-((((

Reply to: