Package: cron
Version: 3.0pl1-86
Severity: important
Tags: patch
When anacron is installed but disabled (ie, no symlink exists in /etc/rc?.d),
then cron will fail to run the cronjobs in /etc/cron.{daily,weekly,monthly}.
This is because the default /etc/crontab file has lines such as the
following:
25 6 * * * root test -x /usr/sbin/anacron || run-parts
--report /etc/cron.daily
The above line checks whether anacron is executable; if so, it skips running
the jobs in /etc/cron.daily, EVEN IF anacron is not running and not scheduled
to run!!
The correct way to solve this problem is for cron to always run these scripts,
and let anacron (or other programs) fend for themselves. As it happens,
anacron installs cronjobs named '0anacron' in /etc/cron.
{daily,weekly,monthly}. When these scripts are run (by cron or anacron or
anything else), they update anacron's timestamps, thus informing anacron not
to re-run the scripts in that directory. In other words, the anacron package
"knows" about cron, and takes necessary action to avoid running scripts
twice; but cron does not know (nor should it) about anacron or other similar
programs.
Fix: replace the default /etc/crontab with the following:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root run-parts --report /etc/cron.hourly
25 6 * * * root run-parts --report /etc/cron.daily
47 6 * * 7 root run-parts --report /etc/cron.weekly
52 6 1 * * root run-parts --report /etc/cron.monthly
#
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]