cron doesn't change schedule when system time is changed
Bug #274631 reported by
Gary
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cron (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cron
When the system time is changed, the cron schedule does not update. It continues to run as if the time had not been updated, until the system is rebooted.
To reproduce:
- Set a cron job to occur 5 minutes after the current time
- Change the system time to something different, so the cron job shouldn't occur in 5 minutes
- Observe the cron job occurring when it shouldn't be
$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
$ apt-cache policy cron
cron:
Installed: 3.0pl1-100ubuntu2
Candidate: 3.0pl1-100ubuntu2
Version table:
*** 3.0pl1-100ubuntu2 0
500 http://
100 /var/lib/
Changed in cron (Ubuntu): | |
assignee: | Jamie Strandboge (jdstrand) → nobody |
status: | Incomplete → Fix Released |
To post a comment you must log in.
Hello,
Have you taken into consideration the comments on cron's man file concerning "hour changes"? I copy from my file below:
"Special considerations exist when the clock is changed by less than 3 hours, for example at the beginning and end of daylight savings time. If the time has moved forwards, those jobs which would have run in the time that was skipped will be run soon after the change. Conversely, if the time has moved backwards by less than 3 hours, those jobs that fall into the repeated time will not be re-run.
Only jobs that run at a particular time (not specified as @hourly, nor with ’*’ in the hour or minute specifier) are affected. Jobs which are specified with wildcards are run based on the new time immediately.
Clock changes of more than 3 hours are considered to be corrections to the clock, and the new time is used immediately."
Would it be the case that your test has interferred with this rule? By how many hours have you changed the clock?