l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Mar 06 20:01

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] cron - not at a different time (fwd)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] cron - not at a different time (fwd)

I accidentally sent this only to Peter... here it is for the record:

On Wed, 3 Mar 2004, Peter Jay Salzman wrote:

> On Wed 03 Mar 04, 12:04 PM, Jeff Newmiller <jdnewmil@dcn.davis.ca.us> said:


> > If cron and anacron are both installed in Debian, /etc/crontab is
> > configured to skip daily/weekly/monthly processing, because
> > /etc/anacrontab specifies those as well, and if your machine is regularly
> > shut down, then anacron is better suited to handle it.  What burns me is
> > that one _or_ the other should be installed...  someone must have decided
> > that cron was good for some things and anacron good for others and wanted
> > both installed... leaving you erroneously thinking you were having some
> > effect by editing the daily entry in /etc/crontab.
> > 
> > In their defense, though, the solution _is_ right there in the line you
> > edited...
> i'm still don't understand -- how does anacron know when, that is the
> *time* (not the date) to run?

This puzzled me too.. thanks to Steve Wormley for pointing me to the

Vixie cron processes three sets of crontabs... /etc/crontab, individual
crontabs (/var/spool/cron/username), and any crontabs found in
/etc/cron.d/.  anacron is invoked periodically by a line in
/etc/cron.d/anacron, and uses the period specs in /etc/anacrontab and
last-executed timestamps in /var/spool/anacron/* to determine whether
enough time has passed that it should invoke the daily/weekly/monthly

> i see references to the last date job X ran in /etc/anacrontab.

You do? Those should be in /var/spool/anacron/* ... for example:

--- /var/spool/anacron/cron.daily/ ---

and /etc/anacrontab should have time interval specifications:

--- /etc/anacrontab ---
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.


# These replace cron's entries
1       5       cron.daily       nice run-parts --report /etc/cron.daily
7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
30      15      cron.monthly nice run-parts --report /etc/cron.monthly

as documented in man anacrontab.

> i understand that anacron prolly looks at these dates when it first
> runs.

Every time it runs.

> i don't see any mention of anacron in /etc/crontab.  how does it run
> after bootup?

um, /etc/init.d/anacron?

I realize now that anacron cannot run separately from cron... but this is
still an absurdly complicated system just to get things to run
periodically.  Also, why retain /etc/crontab at all if /etc/cron.d is
going to be used?

Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.