Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 150228 - Unfortunate interaction between anacron and crontab
Unfortunate interaction between anacron and crontab
Product: Fedora
Classification: Fedora
Component: crontabs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-03-03 15:46 EST by Philip Gwyn
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-22 12:20:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to crontab (613 bytes, patch)
2005-03-03 15:48 EST, Philip Gwyn
no flags Details | Diff

  None (edit)
Description Philip Gwyn 2005-03-03 15:46:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
The /etc/crontab installed has the following :
02 4 * * * root run-parts /etc/cron.daily

The /etc/anacrontab has the following :
1       65      cron.daily              run-parts /etc/cron.daily

My understanding is that this means that anacron will run
/etc/cron.daily on the first reboot of the day, even if crond had
already run them that day.

Same thing for cron.weekly, cron.monthly.

The solution is either 
a) Use anacron to run /etc/cron.daily etc
b) Add a note somewhere that states that cron.daily etc could be run
more then once per period
c) Modify crontab so that it informs anacron that a job has been run
(patch included)

The problem with a) is that anacron has no concept of months. 
cron.monthly is run every 30 days, which isn't what is wanted.  

The problem with b) is that it breaks compatibility with older
versions of Red Hat.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
Reproducing this involves playing with the date on the computer.
Comment 1 Philip Gwyn 2005-03-03 15:48:17 EST
Created attachment 111637 [details]
Patch to crontab
Comment 2 Philip Gwyn 2005-06-01 22:52:08 EDT
I was just poking around and noticed the 0anacrons in /etc/cron.daily, 
cron.weekly and cron.monthly.

So I guess that does roughly the same thing, though 00-logwatch jumps
in before them.
Comment 3 Matthew Miller 2006-07-10 19:20:31 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 4 Marcela Mašláňová 2006-11-22 12:20:42 EST
a/ it's know bug, I'll work on it and many others.
b/ run-parts is runned from cron(tab) every day and run-parts looks in
cron.daily. Then run jobs from cron.daily (if they don't have lock - anacron
doesn't run twice). 

Note You need to log in before you can comment on or make changes to this bug.