Red Hat Bugzilla – Bug 172096
crontab task fail to run withour restart crond
Last modified: 2007-11-30 17:07:21 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Description of problem:
I add a new cron task as following:
13 21 * * * ps ax > /tmp/ps.log
The task do not run and there is no notification email.
But after I restart crond service:
service crond restart
The cron task runs well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. add a new crontab task crontab -e : 14 17 * * * ps ax > /tmp/rootps.log
Actual Results: The task failed to run without restart crond
Actually, I think you'll find that if you wait at least 2 minutes after making
the update, it will take effect without crond restart.
Currently, crond works by loading any updates when the minute changes ;
e.g. at 12:00:00, 12:01:00, and then scheduling the jobs to be run at
successive minutes, so if a job is loaded at 12:00, it will not be run
until 12:01:00 .
So if your '14 17 * * *' job was updated between 17:14:00 and 17:15:59,
it would only be loaded at 17:15:00, and would not be run until 17:15 the
next day .
I am looking at changing this with enhancements to vixie-cron-4.1, which by
default behaves this way, but as the updates always do take effect, this is
not a bug. If you are finding that an update does not take effect within two
minutes, which I cannot reproduce, please re-open this bug.