Bug 150228 - Unfortunate interaction between anacron and crontab
Summary: Unfortunate interaction between anacron and crontab
Alias: None
Product: Fedora
Classification: Fedora
Component: crontabs
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Brock Organ
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-03 20:46 UTC by Philip Gwyn
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2006-11-22 17:20:42 UTC

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

Description Philip Gwyn 2005-03-03 20:46:45 UTC
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 20:48:17 UTC
Created attachment 111637 [details]
Patch to crontab

Comment 2 Philip Gwyn 2005-06-02 02:52:08 UTC
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 23:20:31 UTC
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 17:20:42 UTC
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.