Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] cron not recognizing changes to /etc/cron.d files [SOLVED]
  • From: Joachim Schrod <jschrod@xxxxxxx>
  • Date: Fri, 07 Apr 2006 12:29:54 +0200
  • Message-id: <44363F22.8090207@xxxxxxx>
Scott Leighton wrote:

cron uses the directory timestamps to decide whether or not
to reload crontabs. The various important directories that it monitors include /etc/cron.d, /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly and the user crontabs at /var/spool/cron/tabs

Almost. :-)

cron monitors directory timestamp of /etc/cron.d and /var/spool/cron/tabs and the file timestamp of /etc/crontab. This is explained in the man page of cron, in the 3rd paragraph.

cron does not monitor /etc/cron.{daily,hourly,monthly}. These scripts are executed by /usr/lib/cron/run-crons which is called in /etc/crontab every 15 minutes.
While I'm at it: The actual time when daily jobs are executed is determined by the creation time stamp of /var/spool/cron/lastrun/cron.daily. Since this is the creation time stamp, one cannot change the time by touching the file. Instead, one must remove it with an at job. (Which is a brain-dead design decision, IMHO.)


Joachim Schrod Email: jschrod@xxxxxxx
Roedermark, Germany

< Previous Next >
Follow Ups