cron.daily

Scott Mazur kubuntulists at littlefish.ca
Tue Jan 9 01:05:39 UTC 2007


On Mon, 8 Jan 2007 22:51:45 +0100, Bernhard Breinbauer wrote
> Hi list!
> 
> I'm having a problem with a daily cron job. I would like to execute 
> my backup script every day, therefore i copied it into /etc/cron.daily:
> # ls -l /etc/cron.daily/my_flexbackup.sh
> -rwxr-xr-x 1 root root 9704 2006-12-11 15:04 /etc/cron.daily/my_flexbackup.sh
> 
> But it isn't executed, anacron puts the following in /var/log/syslog:
> 
> Jan  8 07:38:30 localhost anacron[5005]: Job `cron.daily' started
> Jan  8 07:38:30 localhost anacron[6705]: Updated timestamp for job 
> `cron.daily' to 2007-01-08
> Jan  8 07:40:01 localhost /USR/SBIN/CRON[7152]: (root) CMD 
> (test -x /usr/sbin/mcelog -a ! -e /etc/mcelog-disabled &
> & /usr/sbin/mcelog --ignorenodev --filter >> /var/log/mcelog)
> Jan  8 07:41:25 localhost exiting on signal 15
> Jan  8 07:41:26 localhost syslogd 1.4.1#18ubuntu6: restart.
> Jan  8 07:41:36 localhost anacron[5005]: Job `cron.daily' terminated
> Jan  8 07:41:36 localhost anacron[5005]: Normal exit (1 job run)
> 
> As you can see anacron says "1 job run" but there are more files in 
> my cron.daily directory:
> 
> # ls /etc/cron.daily/
> 0anacron  aptitude      find.notslocate  man-db            samba   
>  standard  tetex-bin apt       bsdmainutils  logrotate       
>  my_flexbackup.sh  slocate  sysklogd
> 
> I have no clue what is wrong with my cron jobs.
> When I execute the script manually it runs without error.
> Any hints?

Did you restart the crond service?  Normally cron looks for changes to the
/etc/crontab file.  If this file hasn't changed, cron won't go looking for
your changes until it gets restarted.  I was recently burned on this myself :)

You should also note that anacron and cron are two different tools.  I
typically don't run anacron and I'm not clear on how (according to your logs)
the two are entangled on your machine.  So my advice may be nothing more than
a smoke screen.

Scott

-- 
Registered Linux user #395249, http://counter.li.org
Nothing goes to waste when Little Fish are near!
(http://www.littlefish.ca)





More information about the kubuntu-users mailing list