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

Re: cron and anacron



david david wrote:

> I'm confused between anacron and cron.  I've got a vanilla woody
> install and there appears to be some anacron statements in
> /etc/crontab.  Does that mean I need to install anacron to get the
> entries in /etc/cron.daily, weekly and monthly to run?
> 
> $cat /etc/crontab
> 
> SHELL=/bin/sh
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> 
> # m h dom mon dow user  command
> 25 6    * * *   root    test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.daily
> 47 6    * * 7   root    test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.weekly
> 52 6    1 * *   root    test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.monthly
> #
> 
> Thanks,
> dbp

No, it simply check to see if anacron is installed. Because when anacron is
installed why would anyone want cron jobs to run again. That would be
duplication of effort.

Go learn a little about shell programming.
"test -e /usr/sbin/anacron || run-parts -- report /etc/cron.daily" means
check if the /usr/sbin/anacron executable is present. If not, execute the
run-parts program with /etc/cron.daily as it's input file.

rrs
-- 
Ritesh Raj Sarraf
RESEARCHUT -- http://www.researchut.com
Gnupg Key ID: 04F130BC
"Stealing logic from one person is plagiarism, stealing from many is
research".



Reply to: