l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
May 5: Social gathering
Next Installfest:
Latest News:
Mar. 17: DavisGIG: municipal fiber for Davis
Page last updated:
2004 Mar 03 13:33

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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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

> On Wed 03 Mar 04, 11:28 AM, Jeff Newmiller <jdnewmil@dcn.davis.ca.us> said:
> > On Wed, 3 Mar 2004, Ken Herron wrote:
> > 
> > > --On Wednesday, March 03, 2004 10:11:10 -0800 Peter Jay Salzman 
> > > <p@dirac.org> wrote:
> > > 
> > > >> > 25 4 * * * root test -e /usr/sbin/anacron || run-parts --report
> > > >> /etc/cron.daily
> > > >>
> > > >> That line will only launch "run-parts" if /usr/sbin/anacron doesn't
> > > >> exist. Does /usr/sbin/anacron exist?
> > > >
> > > > ken,
> > > >
> > > > yeah, it does exist.   daily definitely runs.  it just runs at a time i
> > > > wasn't expecting.
> > > 
> > > My point was that if /usr/sbin/anacron exists, then the crontab line 
> > > above will not run cron.daily. You say that /usr/sbin/anacron exists, so 
> > > cron.daily is not being launched as a result of the above crontab line. 
> > > That means something else is running it. Something like anacron, for 
> > > example.
> > 
> > This list is great.  This explains a longstanding puzzle (to me) of how
> > (and to some extent why) both cron and anacron are installed on my debian
> > box.
> > 
> > Now that I see how it works, I am not too impressed with this kludge,
> > though... this is a deceptively obtuse configuration duplication between
> > these two packages.
> ok, maybe i'm slow, but i don't understand why that line will only
> launch if /usr/sbin/anacron doesn't exist.
> /etc/init.d/cron gets run upon startup.  the only test i see is:
>    test -f /usr/sbin/cron || exit 0
> it doesn't look look for /usr/sbin/anacron.  what am i missing?

That is not the test in question.  Search for anacron in your original

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

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.