Red Hat Bugzilla – Bug 36104
Version 3.0.1-61: Duplicated jobs running within one second of each other.
Last modified: 2007-04-18 12:32:41 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.17-14smp i686)
After upgrading to version 3.0.1-61, I noticed that when a job runs just
before 00 seconds, it will be run again at 00 seconds. A typical
/var/log/messages entry is:
Apr 16 19:00:59 holly CROND: (root) CMD (run-parts /etc/cron.hourly)
Apr 16 19:01:00 holly CROND: (root) CMD (run-parts /etc/cron.hourly)
Steps to Reproduce:
1. Search /var/log/messages for cron entries running on 59 seconds, using a
search string of ':59 '.
First observed in bug number 29160 (Package does not automatically restart
crond after upgrade). Posting as a new bug.
The problem seems to me to have been introduced by patch 15
(vixie-cron-3.0.1-time.patch). I think the problem is caused by moving the
call to 'cron_sync()' into the main loop of the program and relying on
'cron_sync()' to provide the 60 second increment to 'TargetTime'. The
problem is that if 'cron_sync()' is called early (i.e., at 59 seconds), it
adds 1 second instead of 60.
A quick fix would seem to be rebuilding vixie-cron-3.0.1-61 with Patch 15
*** This bug has been marked as a duplicate of 29868 ***