1ANACRONTAB(5) Anacron Users' Manual ANACRONTAB(5)
2
3
4
6 /etc/anacrontab - configuration file for anacron
7
9 The file /etc/anacrontab describes the jobs controlled by anacron(8).
10 Its lines can be of three kinds: job-description lines, environment
11 assignments, or empty lines.
12
13 Job-description lines are of one of these two forms:
14
15 period delay job-identifier command
16
17 @period_name delay job-identify command
18
19 The period is specified in days, the delay in minutes. If the RAN‐
20 DOM_DELAY environment variable is set, then a random value between 0
21 and RANDOM_DELAY minutes will be added to the start up delay of the
22 jobs. For example a RANDOM_DELAY set to 12 would therefore add, ran‐
23 domly, between 0 and 12 minutes to the user defined delay. The job-
24 identifier can contain any non-blank character, except slashes. It is
25 used to identify the job in Anacron messages, and as the name for the
26 job's timestamp file. The command can be any shell command. The fields
27 can be seperated by blank spaces or tabs. The period_name can be set
28 to daily, weekly, monthly, yearly or annualy. This will ensure jobs are
29 run once a week, month or year no matter the number of days in this
30 period.
31
32 Environment assignment lines are of the form:
33
34 VAR = VALUE
35
36 Spaces around VAR are removed. No spaces around VALUE are allowed
37 (unless you want them to be part of the value). The assignment takes
38 effect from the next line to the end of the file, or to the next
39 assignment of the same variable. The enviroment variable
40 START_HOURS_RANGE sets the time frame, when the job could started.
41
42 Empty lines are either blank lines, line containing white-space only,
43 or lines with white-space followed by a '#' followed by an arbitrary
44 comment.
45
46 You can continue a line onto the next line by ending it with a '\'.
47
48 In case there is need for having anacron off, then it can be done by
49 adding cron job 0anacron into /etc/cron.hourly/jobs.deny which is part
50 of crontabs(4).
51
53 This example shows how to set up the behaviour similar to previous set‐
54 ting in /etc/crontab which will start all regular jobs only between
55 6:00 and 8:00. There is added RANDOM_DELAY which will be maximally 30
56 minutes. Jobs will be running in queue. After one finish, then next
57 will start.
58
59 # environment variables
60 SHELL=/bin/sh
61 PATH=/sbin:/bin:/usr/sbin:/usr/bin
62 MAILTO=root
63 RANDOM_DELAY=30
64 # Anacron jobs will start between 6 and 8 o'clock.
65 START_HOURS_RANGE=6-8
66 # delay will be 5 minutes + RANDOM_DELAY for cron.daily
67 1 5 cron.daily nice run-parts /etc/cron.daily
68 7 0 cron.weekly nice run-parts /etc/cron.weekly
69 @monthly 0 cron.monthly nice run-parts /etc/cron.monthly
70
72 anacron(8), crontabs(4)
73
74 The Anacron README file.
75
77 Itai Tzur <itzur@actcom.co.il>
78
79 Currently maintained by Pascal Hakim <pasc@(debian.org|redel‐
80 lipse.net)>.
81
82 For Fedora maintained by Marcela Mašláňová <mmaslano@redhat.com>.
83
84
85
86Marcela Mašláňová 2009-08-17 ANACRONTAB(5)