from Wikipedia, the free encyclopedia

anacron is a computer program similar to cron for the time-controlled start of computer programs. In contrast to cron, which assumes that the computer is running permanently, as is usual with servers, Anacron not only takes the current time into account for the evaluation, but also the time span since the last start in the decision. This makes it possible for devices that do not run all the time, such as B. laptops and desktop computers . The original implementation was written in Perl by Christian Schwarz, the current implementation in C comes from Itai Tzur. anacron is free software under the GNU General Public License (GPL).


Anacron is a cron supplement, so it requires an installed cron version and is mainly used on workstations or notebooks that are not switched on all the time.

The cron program is mainly used in the server area to (every night at 01:00 to daytime as much computing power normal users to provide z. B.) an action to perform on a regular basis, such as archiving and compressing of log files . If the computer, for example a workstation computer , is switched off at 8:00 p.m. and switched on again the next day at 8:00 a.m., cron does not take care of any cron jobs that may have elapsed during the night, because the computer was switched off at these times.

Anacron, on the other hand, registers the missing execution the next time the desktop system is switched on and starts the missed jobs as soon as possible. If several jobs have been missed, they are not all started at the same time, but executed one after the other (sequentially). It is possible to set the jobs to be executed at the same time (in parallel), but such a setting can cause CPU , hard disk or memory to be used so heavily (e.g. when updating a file index) that regular users can use these resources absence.

One of the disadvantages of anacron is that only the system administrator, usually with root rights , can define anacron jobs. Users without root rights can use the Unix at command to guarantee that actions will be carried out at a specific point in time. A missing execution will be made up at a later point in time while the machine is running.

In addition, anacron is only able to start time-controlled programs once a day or less than once a week - this disadvantage is put into perspective insofar as Cron can also suffice with frequent execution. In contrast, Cron is able to run jobs at intervals of one minute to annually.

Web links

Individual evidence

  1. Project overview at SF