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

Re: Is anacron right for me?

On Wed, 1 Jul 1998 servis@purdue.edu wrote:

> I am wondering if anacron is the right package for me?  My primary
> concern is the proper execution of the /etc/cron.*/ scripts.

Anacron is a script that does this:

1. Checks a list of tasks to see when each was last run;
2. For the tasks that have been run too long ago ("too long" is
configurable for each package), it re-executes them.

The debian config for anacron is setup so that "too long" is 1 day for
scripts in /etc/cron.daily, 1 week for scripts in /etc/cron.weekly and 1
month for scripts in /etc/cron.monthly . This means that, if you shut the
system down today and turn it back on 3 months from now, the daily, weekly
and monthly scripts will be executed *once* after power up. Anacron is
smart enough not to start them all simultaneously.

The anacron installer also removes the daily, weekly and monthy entries in
crontab, so that cron and anacron don't mess with each other. Finally, I
think it puts itself into crontab, so that if your sistem stays up for a
few days in a row, anacron is started every day (night, actually) to check
for "too old" tasks. This means everything should go fine with anacron
even if your system is up 24/7.

What cron gives you that anacron doesn't is exact time. If you want your
logs to be rotated roughly every month, anacron is very fine; but if you
want your system to mail you a reminder for a payment due on the 6th of
every month, anacron can't do that. OTOH, with cron, if the machine isn't
up at the exact moment when the mail should be sent, it will *never* be

Hope this helps,
That's Internet!

It's all true, and you don't know nothing yet.

Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Reply to: