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

Re: Anacron vs. cron.

On Sunday 02 May 2004 1:05 am, Micha Feigin wrote:
> On Sat, May 01, 2004 at 04:27:01PM -0700, Marc Wilson wrote:
> > On Sat, May 01, 2004 at 07:41:50PM +0100, Geoff Thurman wrote:
> > > Anacron is recommended if your computer is not left on more or
> > > less continuously. I'm not sure why it doesn't just supercede
> > > cron, or why it isn't pulled in with it or anything, [1] but I
> > > strongly advise you to install anacron.
> >
> > Because anacron is an *adjunct* to cron, it does not *replace* it.
> > Actually learning what anacron *is*, might be helpful.
> anacron is meant for computers that spend some part of the day
> (usually at night) off so they can have a tendency to usually miss
> the cron jobs. If it is installed to will run by cron and execute the
> cron jobs instead of cron so that to make sure that missed jobs are
> run. 

Thanks for posting. Actually I knew this much: apparently my clumsy 
emails suggested otherwise.

>If its not installed the only entries are:
> crontab:11:25 6	* * *	root	test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.daily crontab:12:47 6	* * 7	root	test -e
> /usr/sbin/anacron || run-parts --report /etc/cron.weekly
> crontab:13:52 6	1 * *	root	test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.monthly

Oddly, I do have anacron installed and yet Task Scheduler still shows 
the above rather than what you show below. I tried crontab -u sys -l 
(as root)  but I got an error message saying 'You (sys) are not allowed 
to use this program (crontab)'. Clearly I was doing something wrong, or 
missing something, and anyway it's of little matter in the end - my 
computer is off overnight, so anacron runs daily from init.d. (I use 
woody, by the way). For his part, the OP has removed anacron and will 
doubtless post again if this doesn't solve his problem.

> Which makes things run as they should. once you install it you get
> crontab looking like:
> cron.d/anacron:6:30 7    * * *   root	test -x /etc/init.d/anacron &&
> /usr/sbin/invoke-rc.d anacron start >/dev/null
> cron.daily/0anacron:11:test -x /usr/sbin/anacron || exit 0
> cron.daily/0anacron:12:anacron -u cron.daily
> cron.monthly/0anacron:11:test -x /usr/sbin/anacron || exit 0
> cron.monthly/0anacron:12:anacron -u cron.monthly
> crontab:11:25 6	* * *	root	test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.daily crontab:12:47 6	* * 7	root	test -e
> /usr/sbin/anacron || run-parts --report /etc/cron.weekly
> crontab:13:52 6	1 * *	root	test -e /usr/sbin/anacron || run-parts
> --report /etc/cron.monthly cron.weekly/0anacron:11:test -x
> /usr/sbin/anacron || exit 0
> cron.weekly/0anacron:12:anacron -u cron.weekly
> It should be an essential package as it isn't one, but the installer
> should probably install it as part of a workstation task or the
> like. That is an installer setup issue though and if it isn't in
> there it should probably be submitted as a suggestion for the
> installer people.

Yes, I see what you mean. I haven't tried the new installer, so I don't 
know whether they already have this covered. I'll just suggest it on 
debian-devel, perhaps. Thanks again for your post.



Reply to: