A question about anacron (ubuntu 8.10)

Chris G cl at isbd.net
Thu Feb 5 17:07:18 UTC 2009


On Thu, Feb 05, 2009 at 10:02:42AM -0700, Smoot Carl-Mitchell wrote:
> On Thu, 2009-02-05 at 11:29 -0500, Pete Clapham wrote:
> 
> > OK, my installation includes anacron, and the "services" button 
> > indicates that it is running.  However, when I put a command into the 
> > cron.daily directory it didn't run.  What else do I have to do in order 
> > to get it to run?
> 
> It runs at a specific time each day.  The actual cron entries are
> in /etc/crontab.  You will see a line like:
> 
> 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts
> --report /etc/cron.daily )
> 
> This means the "daily" cron tasks will run at 6:25 AM every day.
> run-parts executes all the scripts in the /etc/cron.daily directory at
> the indicated time.
> 
Yes, but the whole point of anacron is that, even if your machine was
switched off at 6:25 AM, when you switch it on anacron 'remembers'
that the cron jobs should have been run.  After a programmable delay
it runs the cron jobs that have been missed.

> Also be sure the script in /etc/cron.daily has the execute bits set.
> e.g.
> 
> sudo chown 755 script_name
> 
> You can do a dry run test to see what will be executed by running:
> 
> run-parts --test /etc/cron.daily
> 
What I can't find is a detailed description of what anacron does, e.g.
*which* cron jobs it will run 'late' and whether it picks up user cron
jobs as well as the ones in /etc/cron.xxx.

-- 
Chris Green




More information about the ubuntu-users mailing list