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

question about cron and anacron



When I moved to Etch, I noticed something strange, and
am looking for an explanation. My cron job for doing 
daily backups started doing the job at the wrong time.

It turns out that the move to Etch somehow installed
anacron on a system that is supposed to be left on and
it was anacron that was actually running the script.

But how? I look at the code in /etc/crontab and in
/etc/cron.daily/0anacron and I think I see that it
is impossible for anacron to be run on a daily basis:

/etc/anacron contains a line:
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

This line invokes run-parts only if anacron is _not_ installed. And,

$ ls /etc/cron.daily/
00test-env  10chkpnt  aptitude      exim4-base  logrotate  modutils  standard
0anacron    apt       bsdmainutils  find        man-db     samba     sysklogd

And,
script 0anacron contains:
#!/bin/sh
#
# anacron's cron script
#
# This script updates anacron time stamps. It is called through run-parts
# either by anacron itself or by cron.
#
# The script is called "0anacron" to assure that it will be executed
# _before_ all other scripts.

test -x /usr/sbin/anacron || exit 0
anacron -u cron.daily
<end>

But how is this script executed usefully? Since cron doesn't do
run-parts /etc/cron.daily if anacron is installed?

Further, it appears that cron.daily scripts _are_ being run daily, ---
at 7:35am.  Why 7:35am? Where is that time set? It is _not_ a time
that is in /var/spool/anacron. I can't think of anywhere else to look.

There is something, somewhere, that is doing this. Where?

-- 
Paul E Condon           
pecondon@mesanetworks.net



Reply to: