Home : Computers : Linux : Man Pages : anacron



       anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job]
       anacron [-S spooldir] -u [-t anacrontab] [job]
       anacron [-V|-h]
       anacron -T [-t anacrontab]


       Anacron  is  used  to  execute  commands periodically, with a frequency
       specified in days.  Unlike cron(8), it does not assume that the machine
       is  running  continuously.   Hence, it can be used on machines that are
       not running 24 hours a day to control regular jobs  as  daily,  weekly,
       and monthly jobs.

       Anacron  reads  a  list  of jobs from the /etc/anacrontab configuration
       file (see anacrontab(5)).  This file contains the  list  of  jobs  that
       Anacron  controls.   Each job entry specifies a period in days, a delay
       in minutes, a unique job identifier, and a shell command.

       For each job, Anacron checks whether this job has been executed in  the
       last  n  days, where n is the time period specified for that job.  If a
       job has not been executed in n days or more,  Anacron  runs  the  job's
       shell command, after waiting for the number of minutes specified as the
       delay parameter.

       After the command exits, Anacron records the date (excludes  the  hour)
       in  a  special timestamp file for that job, so it knows when to execute
       that job again.

       When there are no more jobs to be run, Anacron exits.

       Anacron  only  considers  jobs  whose  identifier,  as   specified   in
       anacrontab(5),  matches any of the job command-line arguments.  The job
       command-line arguments can be represented by  shell  wildcard  patterns
       (be sure to protect them from your shell with adequate quoting).  Spec-
       ifying no job command-line arguments is equivalent  to  specifying  "*"
       (that is, all jobs are considered by Anacron).

       Unless Anacron is run with the -d option (specified below), it forks to
       the background when it starts, and any parent  processes  exit  immedi-

       Unless Anacron is run with the -s or -n options, it starts jobs immedi-
       ately when their delay is over.  The execution  of  different  jobs  is
       completely independent.

       If  an executed job generates any output to standard output or to stan-
       dard error, the output is mailed to the user under whom Anacron is run-
       ning (usually root), or to the address specified in the MAILTO environ-
       ment variable in the /etc/anacrontab file, if such exists.  If the LOG-
       NAME  environment variable is set, it is used in the From: field of the

       -s     Serializes execution of jobs.  Anacron does not start a new  job
              before the previous one finished.

       -n     Runs  jobs  immediately  and ignores the specified delays in the
              /etc/anacrontab file.  This options implies -s.

       -d     Does not fork Anacron to the background.  In this mode,  Anacron
              will output informational messages to standard error, as well as
              to syslog.  The output of any job is mailed by Anacron.

       -q     Suppresses any messages to standard error.  Only applicable with

       -t some_anacrontab
              Uses  the  specified anacrontab, rather than the /etc/anacrontab
              default one.

       -T     Anacrontab testing. Tests the /etc/anacrontab configuration file
              for  validity.  If there is an error in the file, it is shown on
              the standard output and Anacron returns the value of  1.   Valid
              anacrontabs return the value of 0.

       -S spooldir
              Uses the specified spooldir to store timestamps in.  This option
              is required for users who wish to run anacron themselves.

       -V     Prints version information, and exits.

       -h     Prints short usage message, and exits.


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


       Make  sure  your  time-zone  is set correctly before Anacron is started
       since the time-zone affects the date.  This is usually accomplished  by
       setting  the TZ environment variable, or by installing a /usr/lib/zone-
       info/localtime file.  See tzset(3) for more information.

       Timestamp files are created in the spool directory for each job  speci-
       fied  in an anacrontab.  These files are never removed automatically by
       Anacron, and should be removed by hand if a  job  is  no  longer  being


              Contains  specifications  of jobs.  See anacrontab(5) for a com-
              plete description.


       Mail  comments,  suggestions  and  bug  reports  to Sean 'Shaleh' Perry


       Anacron was originally conceived and implemented by  Christian  Schwarz

       The  current  implementation is a complete rewrite by Itai Tzur <itzur@

       The code base was maintained by Sean  'Shaleh'  Perry  <shaleh@(debian.

       Since  2004,  it  is  maintained  by  Pascal  Hakim  <pasc@(debian.org|

       For   Fedora,   Anacron   is   maintained   by   Marcela    MaAilAiAovA

cronie 2012-11-22 ANACRON(8)

Subscribe to us on YouTube