[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron, won't change time !



Shawn Lamson wrote:

On Thu, July 24 at  8:13 AM EDT
David selby <debian@pusspaws.net> wrote:

# /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
MAILTO=web

# m h dom mon dow user  command
25 1    * * *   root    test -e /usr/sbin/anacron || run-parts --report

/etc/cron.daily
47 6    * * 7   root    test -e /usr/sbin/anacron || run-parts --report

/etc/cron.weekly
52 6    1 * *   root    test -e /usr/sbin/anacron || run-parts --report

/etc/cron.monthl
y
#

& changed cron.daily to 1:25 ... guess what 7:35 it executed ! I did a /etc/init.d/cron restart, 7:35, I did a system re-boot, 7:35 !

I checked out anacron, I don't see how this can have an effect

Any Ideas what I am doing wrong ?

I think if you man 5 crontab it says in a comment in the ample file that
the directory /etc/cron.d is now used for anachron.  Edit the file
/etc/cron.d/anachron... to me this system is doubled up and I would
comment out the lines in the system wide crontab - maybe this is wrong
and someone can point out why?

Shawn Lamson
shawn.lamson@verizon.net


Thanks for the heads up ... So /etc/crontab has ...

25 6 * * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily

ie if anacron don't exist, execute cron.daily as a backup system ...

/etc/cron.d/anacron ...

30 7 * * * root test -x /etc/init.d/anacron && /etc/init.d/anacron start >/dev/n
ull

mmm ... and man 5 anacron has

EXAMPLE SYSTEM CRON FILE
This has the username field, as used by /etc/crontab.
# /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 usercommand
42 6 * * *rootrun-parts --report /etc/cron.daily
47 6 * * 7rootrun-parts --report /etc/cron.weekly
52 6 1 * *rootrun-parts --report /etc/cron.monthly
#
# Removed invocation of anacron, as this is now handled by a
# /etc/cron.d file

Kind of makes sense ...

Dave








Reply to: