Linux Command Directory


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



anacron

anacron [options] [job]

System administration command. Normally started in a system startup file. Execute commands periodically. By default, anacron reads a list of jobs from a configuration file, /etc/anacrontab. The file consists of shell variables to use when running commands, followed by a list of tasks to run. Each task specifies how often in days it should be run, a delay in minutes to wait before running the task, a unique job identifier used to store a timestamp, and the shell command to execute. Timestamps for the last run of each task are stored in the /var/spool/anacron file. For each task, anacron compares the stored timestamp against the current time. If the command has not been executed within the specified frequency, the command is run. Upon completion, anacron records the new date in the timestamp file. Limit anacron to a specified task by providing the task's unique job identifier on the command line.

The anacron command is often used to support the cron daemon on systems that do not run continuously.

Options

-d

Run in foreground rather than as a background process. Send messages to standard error.

-f

Run tasks ignoring timestamps.

-h

Print help message, then exit.

-n

Run tasks now, ignoring delay specifications.

-q

Suppress messages to standard error when using the -d option.

-s

Execute tasks serially. Do not start new task until previous task is completed.

-t file

Read tasks from file instead of from /etc/anacrontab.

-u

Update timestamps for tasks, but don't run them.

-V

Print version number, then exit.


More Linux resources from O'Reilly >>

Popular Topics

Browse Books & Videos

International Sites

O'Reilly China O'Reilly Germany O'Reilly Japan