9.8. Scheduling Asynchronous Tasks: anacron
anacron
is the daemon that completes cron
for computers that are not on at all times. Since regular tasks are usually scheduled for the middle of the night, they will never be executed if the computer is off at that time. The purpose of anacron
is to execute them, taking into account periods in which the computer is not working.
Please note that anacron
will frequently execute such activity a few minutes after booting the machine, which can render the computer less responsive. This is why the tasks in the /etc/anacrontab
file are started with the nice
command, which reduces their execution priority and thus limits their impact on the rest of the system. Beware, the format of this file is not the same as that of /etc/crontab
; if you have particular needs for anacron
, see the anacrontab(5) manual page.
Installation of the anacron package deactivates execution by cron
of the scripts in the /etc/cron.hourly/
, /etc/cron.daily/
, /etc/cron.weekly/
, and /etc/cron.monthly/
directories. This avoids their double execution by anacron
and cron
. The cron
command remains active and will continue to handle the other scheduled tasks (especially those scheduled by users).