FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-08-2008, 05:15 PM
"Brian McKee"
 
Default anacron with cron or alternate to cron

Hi All

I'm confused about running anacron and cron at the same time. I was
under the impression that it was either/or, but I see on a server
running here that it has both cron and anacron. IIUC, anacron keeps
track of jobs it runs, and marks down the completion time so it knows
when it needs to be run the next time. How does anacron know that
cron already ran that job and it doesn't need to?

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-08-2008, 06:27 PM
"Brian McKee"
 
Default anacron with cron or alternate to cron

On Tue, Jul 8, 2008 at 1:15 PM, Brian McKee <brian.mckee@gmail.com> wrote:
> How does anacron know that
> cron already ran that job and it doesn't need to?

Found my answer - there's a script called 0anacron in /etc/cron.daily
that runs 'anacron -u cron.daily' which updates anacron's time stamps
without actually running the scripts.

So, it's worth noting that if you want something in /etc/crontab to be
run by anacron if crontab fails, it needs to be in both places, and
the cron job has to update the anacron stamp....

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-08-2008, 07:03 PM
Sven Joachim
 
Default anacron with cron or alternate to cron

On 2008-07-08 19:15 +0200, Brian McKee wrote:

> I'm confused about running anacron and cron at the same time. I was
> under the impression that it was either/or, but I see on a server
> running here that it has both cron and anacron.

Just look at anacron's dependencies, it recommends cron.

> IIUC, anacron keeps
> track of jobs it runs, and marks down the completion time so it knows
> when it needs to be run the next time. How does anacron know that
> cron already ran that job and it doesn't need to?

See /etc/crontab and /etc/anacrontab. Anacron runs the scripts in
/etc/cron.{daily,weekly,monthly}, cron the ones in /etc/cron.{hourly,d}.

Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 12:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org