Bug 720142 - cron.weekly/ should run on Sunday
Summary: cron.weekly/ should run on Sunday
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: 14
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-10 07:49 UTC by Jan Kratochvil
Modified: 2012-06-19 15:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-19 15:51:23 UTC
Type: ---


Attachments (Terms of Use)

Description Jan Kratochvil 2011-07-10 07:49:49 UTC
Description of problem:
cron.weekly/ jobs were always run on Sunday.  Now they run on any unspecific day, usually on Monday but even other weekdays.

As for example /etc/cron.weekly/99-raid-check affects machine performance for a long time its load may creep into a workday.

Version-Release number of selected component (if applicable):
FAIL: cronie-1.4.7-1.fc14 + crontabs-1.11-1.20101115git.fc14
FAIL: RHEL-6.0 (and whatever Fedora it was derived from)
PASS: RHEL-5.0 (and whatever Fedora it was derived from)

How reproducible:
Always.

Steps to Reproduce:
grep cron.weekly /var/log/cron*

Actual results:
F-14:
Jun 20 = Monday
Jun 27 = Monday
Jul  4 = Monday
ScientificLinux-6.0:
Jun 17 = Friday
Jun 24 = Friday
Jul  1 = Friday

Expected results:
CentOS-5.5:
Jun 26 = Sunday
Jul  3 = Sunday
Jul 10 = Sunday

Additional info:
CentOS-5.5:
/etc/crontab:
22 4 * * 0 root run-parts /etc/cron.weekly
man 5 crontab
day of week    0-7 (0 or 7 is Sun, or use names)

F-14:
#period in days	delay in minutes	job-identifier	command
7		25			cron.weekly	... /etc/cron.weekly

Comment 1 Tomas Mraz 2011-07-11 10:30:06 UTC
You can install cronie-noanacron and remove cronie-anacron package as a workaround.

Comment 2 Marcela Mašláňová 2012-06-19 12:08:03 UTC
As was posted in previous comment you can use old /etc/crontab setting from cronie-noanacron package.
Or you can change these two lines in /etc/anacrontab:
#RANDOM_DELAY=45
7       0      cron.weekly             nice run-parts /etc/cron.weekly

I guess randomization of jobs push weekly to the Monday. Or do they run on Monday because you switched off your computer for weekend?

Comment 3 Jan Kratochvil 2012-06-19 15:51:23 UTC
My systems all run 24x7.  They are only shortly rebooted once approx. a month.

I do not know why but F16 runs cron.weekly now correctly at Sat-Sun midnight.
cron-20120528:May 26 00:33:01 host2 anacron[5200]: Job `cron.weekly' started
cron-20120528:May 26 09:15:51 host1 anacron[12864]: Job `cron.weekly' started
cron-20120603:Jun  2 00:37:01 host2 anacron[6928]: Job `cron.weekly' started
cron-20120603:Jun  2 09:01:39 host1 anacron[4019]: Job `cron.weekly' started
cron-20120611:Jun  9 00:40:59 host2 anacron[23916]: Job `cron.weekly' started
cron-20120611:Jun  9 08:21:24 host1 anacron[32471]: Job `cron.weekly' started
cron-20120617:Jun 16 00:38:01 host2 anacron[11370]: Job `cron.weekly' started
cron-20120617:Jun 16 08:22:40 host1 anacron[13504]: Job `cron.weekly' started

Moreover the only problematic weekly script "raid-check" is no longer affected:

* Fri Mar 25 2011 Doug Ledford <dledford> - 3.1.5-1
- Move the raid-check script from cron.weekly to /usr/sbin, add a crontab
  file to /etc/cron.d and mark it config(noreplace).  This way users can
  select their own raid-check frequency and have it honored through
  upgrades.
==> /etc/cron.d/raid-check <==
# Run system wide raid-check once a week on Sunday at 1am by default
0 1 * * Sun root /usr/sbin/raid-check

So in fact I no longer care when cron.weekly/ is being run, either if it has been fixed or not.


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