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

Re: Anacron schedule



To recap, I am trying to find out where anacron is instructed to run
at 7 am(ish) every morning so that i may change it to 5 am. 

Thanks for any help,

judith

In response to a listing of suggested places to look, I document the
parts of anacron i now understand:


On Tue, Mar 06, 2001 at 12:50:20AM +0200, Shaul Karl wrote:
> 
> /etc/anacrontab, 

This is where one specifies how frequently something is run & a delay
between the invocation of anacron & running the job.

> /var/spool/anacron/*, 

These are the date stamps for anacron jobs. They specify the DATE the
command was last run (not the time). 

> anacron (8), anacron (5), 

Nice, concise man pages. They don't specify how anacron is invoked
automatically.

> /usr/share/doc/cron/README.anacron,
> /sur/share/doc/anacron/README.Debian.

Very similar in content. Details how the lines in /etc/crontab are
structured so that if anacron exists, the daily, weekly, and monthly
run-parts are NOT run by cron. neither state how anacron is invoked on
a regular basis.

> 
> I didn't tried to find out for sure but I guess that the scheduling of anacron 
> is related to the content or the time stamp of /var/spool/anacron/*. 

See note above.

> /etc/init.d/anacron might also be involved.


This is where anacron is run on system boot up. This is probably the
most important part of anacron, but since my system is often left on
over night (that might change with the California power shortage...)
this is not the invocation of anacron that runs run-parts on a daily
basis.


> > Thanks in advance,
> > 
> > judith
> > 
> > >From /etc/crontab:
> > 
> > # m h dom mon dow user  command
> > 25 5    * * *   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily
> > 27 5    * * 7   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.weekly
> > 29 5    1 * *   root    test -e /usr/sbin/anacron || run-parts --report /etc/cron.monthly
> > #
> > 
> > 
> > zmore /usr/share/doc/anacron/README.gz
> > 
> > "   In addition to running Anacron from the boot-scripts, it is also
> > recommended to schedule it as a daily cron-job (usually at an early
> > morning hour), so that if the machine is kept running for a night,
> > jobs for the next day will still be executed."
> > 
> > 
> > 
> > more /usr/share/doc/anacron/README.Debian
> > 
> > "To avoid cron and anacron running the same job, place a line like:
> > 
> > test -x /usr/sbin/anacron || run-parts
> > 
> > in your crontab.  This will check if anacron exists and if not, it will let
> > cron do its thing.  The advantage is that if you later remove anacron, this
> > will still work."
> > 
> > 
> > 
> > < 145 10:11am greycat:/> /usr/sbin/anacron -V
> > Anacron 2.1
> > Copyright (C) 1998  Itai Tzur <itzur@actcom.co.il>
> > Copyright (C) 1999  Sean 'Shaleh' Perry <shaleh@debian.org>
> > 
> > Mail comments, suggestions and bug reports to <shaleh@debian.org>.
> > 













Reply to: