Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] cron not recognizing changes to /etc/cron.d files [SOLVED]
  • From: Scott Leighton <helphand@xxxxxxxxxxx>
  • Date: Thu, 6 Apr 2006 20:21:55 -0800
  • Message-id: <200604062121.56356.helphand@xxxxxxxxxxx>
On Thursday 06 April 2006 8:35 pm, Patrick Shanahan wrote:
> * Scott Leighton <helphand@xxxxxxxxxxx> [04-06-06 23:30]:
> > The cron files in /etc/cron.d, /etc/cron.daily, /etc/cron.hourly,
> > /etc/cron.weekly, and /etc/cron.monthly are not meant to be
> > edited with crontab -e as I understand it.
>
> no, they are not. But I believe that you need to do 'rccron restart'
> after editing the system crontabs.

OK, here's what I've found out.

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

The crontab program automatically takes care of updating the
directory timestamp for /var/spool/cron/tabs if a user changes
their tab with crontab -e.

Some editors, like vim, also change directory timestamps when you
edit a file, so they have the effect of essentially acting like crontab -e
would when used on a system cron file saved at /etc/cron*

My particular issue is that I've come to expect that the editor
I am primarily using, mcedit, acts right and changes the directory
timestamp. Unfortunately, it apparently doesn't always do so (which
is a whole new issue) since it acts one way on my home system
and a completely different way on my work system (I've compared
the ~/.mc/ini files on both systems, they are identical, so I don't
think it is a config issue, but I'm still looking).

Anyways, bottom line, the issue really isn't a cron issue since
the behavior is really caused by the editor used, not cron itself.

Scott



--
Paucis verbis, quid est deconstructionismus?
POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/
Linux 2.6.11.4-21.11-default x86_64
SuSE Linux 9.3 (x86-64)

< Previous Next >