1ANACRON(8)                   Anacron Users' Manual                  ANACRON(8)
2
3
4

NAME

6       anacron - runs commands periodically
7

SYNOPSIS

9       anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [job] ...
10       anacron -u [-t anacrontab] [job] ...
11       anacron [-V|-h]
12

DESCRIPTION

14       Anacron  can be used to execute commands periodically, with a frequency
15       specified in days.  Unlike cron(8), it does not assume that the machine
16       is running continuously.  Hence, it can be used on machines that aren't
17       running 24 hours a day, to control daily, weekly, and monthly jobs that
18       are usually controlled by cron.
19
20       When  executed, Anacron reads a list of jobs from a configuration file,
21       normally /etc/anacrontab (see anacrontab(5)).  This file  contains  the
22       list  of jobs that Anacron controls.  Each job entry specifies a period
23       in days, a delay in minutes, a unique job identifier, and a shell  com‐
24       mand.
25
26       For  each job, Anacron checks whether this job has been executed in the
27       last n days, where n is the period specified for  that  job.   If  not,
28       Anacron  runs  the job's shell command, after waiting for the number of
29       minutes specified as the delay parameter.
30
31       After the command exits, Anacron records the date in  a  special  time‐
32       stamp file for that job, so it can know when to execute it again.  Only
33       the date is used for the time calculations.  The hour is not used.
34
35       When there are no more jobs to be run, Anacron exits.
36
37       Anacron only considers jobs  whose  identifier,  as  specified  in  the
38       anacrontab  matches  any  of  the  job command-line arguments.  The job
39       arguments can be shell wildcard patterns (be sure to protect them  from
40       your  shell  with  adequate  quoting).  Specifying no job arguments, is
41       equivalent to specifying "*"  (That is, all jobs will be considered).
42
43       Unless the -d option is given (see below), Anacron forks to  the  back‐
44       ground when it starts, and the parent process exits immediately.
45
46       Unless  the -s or -n options are given, Anacron starts jobs immediately
47       when their delay is over.  The execution  of  different  jobs  is  com‐
48       pletely independent.
49
50       If a job generates any output on its standard output or standard error,
51       the output is mailed to the user running Anacron (usually root).
52
53       Informative messages about what Anacron is doing are sent to syslogd(8)
54       under  facility cron, priority notice.  Error messages are sent at pri‐
55       ority error.
56
57       "Active" jobs (i.e. jobs that Anacron already decided to  run  and  now
58       wait  for  their  delay to pass, and jobs that are currently being exe‐
59       cuted by Anacron), are "locked", so that other copies of Anacron  won't
60       run them at the same time.
61

OPTIONS

63       -f     Force execution of the jobs, ignoring the timestamps.
64
65       -u     Only update the timestamps of the jobs, to the current date, but
66              don't run anything.
67
68       -s     Serialize execution of jobs.  Anacron will not start a  new  job
69              before the previous one finished.
70
71       -n     Run   jobs   now.    Ignore  the  delay  specifications  in  the
72              /etc/anacrontab file.  This options implies -s.
73
74       -d     Don't fork to the background.  In this mode, Anacron will output
75              informational  messages to standard error, as well as to syslog.
76              The output of jobs is mailed as usual.
77
78       -q     Suppress messages to standard error.  Only applicable with -d.
79
80       -t anacrontab
81              Use specified anacrontab, rather than the default
82
83       -V     Print version information, and exit.
84
85       -h     Print short usage message, and exit.
86

SIGNALS

88       After receiving a SIGUSR1 signal, Anacron waits for  running  jobs,  if
89       any,  to  finish  and  then  exits.   This  can be used to stop Anacron
90       cleanly.
91

NOTES

93       Make sure that  the  time-zone  is  set  correctly  before  Anacron  is
94       started.   (The  time-zone  affects  the date).  This is usually accom‐
95       plished by setting the TZ environment  variable,  or  by  installing  a
96       /usr/lib/zoneinfo/localtime file.  See tzset(3) for more information.
97

FILES

99       /etc/anacrontab
100              Contains  specifications  of jobs.  See anacrontab(5) for a com‐
101              plete description.
102
103       /var/spool/anacron
104              This directory is used by Anacron for storing timestamp files.
105

SEE ALSO

107       anacrontab(5), cron(8), tzset(3)
108
109       The Anacron README file.
110

BUGS

112       Anacron never removes timestamp files.  Remove unused files manually.
113
114       Anacron uses up to two file descriptors for each active  job.   It  may
115       run out of descriptors if there are more than about 125 active jobs (on
116       normal kernels).
117
118       Mail comments, suggestions and  bug  reports  to  Sean  'Shaleh'  Perry
119       <shaleh@(debian.org|valinux.com)>.
120

AUTHOR

122       Anacron  was  originally conceived and implemented by Christian Schwarz
123       <schwarz@monet.m.isar.de>.
124
125       The  current  implementation  is  a  complete  rewrite  by  Itai   Tzur
126       <itzur@actcom.co.il>.
127
128       The   code   base  is  currently  maintained  by  Sean  'Shaleh'  Perry
129       <shaleh@(debian.org|valinux.com)>.
130
131
132
133Sean 'Shaleh' Perry               2000-06-22                        ANACRON(8)
Impressum