Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (82 sloc) 2.27 KB
.TH ANACRONTAB 5 "2014-09-16" "{{ package }} {{ version }}" anacrontab
.SH NAME
/etc/anacrontab \- monotonic jobs
.SH DESCRIPTION
The file
.I /etc/anacrontab
follow the rules previously set by \fBanacron(8)\fR.
.PP
Lines starting with '#' are comments.
.PP
Environment variables can be set using
.B VAR=VALUE
keypairs.
.PP
The special
.B RANDOM_DELAY
(in minutes) environment variable is translated to
.B AccuracySec=.
The special
.B START_HOURS_RANGE
(in hours) environment variable is translated to the
.I \'hour\'
component of
.B OnCalendar=.
anacron expect a range in the format ##-##, systemd-crontab-generator
only use the starting hour of the range as reference.
The other lines are job-descriptions that follow this layout:
.PP
.B period delay job-identifier command
.PP
.TP
*
.I period
is a number of days to wait between each job execution, or special values @daily, @weekly, @monthly, @yearly
.PP
.TP
*
.I delay
is a number of extra minutes to wait before starting job. It is translated in
.B OnBootSec=
.
.PP
.TP
*
.I job-identifier
is a single word. systemd-crontab-generator uses it to construct the dynamic unit names:
.I cron-<job-identifier>-root-0.timer
and matching
.I cron-<job-identifier>-root-0.service
.PP
.TP
*
.I command
is the command that is run by a shell
.SH BUGS
systemd-crontab-generator doesn't support multiline commands.
.PP
Any
.I period
greater than 30 is rounded to the closest month
.PP
There are subtle differences on how anacron & systemd handle persistente timers:
anacron will run a weekly job at most once a week, with allways a minimum delay of 6 days
between runs; where systemd will try to run it every monday at 00:00;
or as soon the system boot. In the most extreme case, if a system was only started on sunday;
a weekly job will run this day and the again the next (mon)day.
.br
With careful manual settings, it would be possible to run the
real anacron binary (not your distro's package) with systemd-cron;
if you need an identical behaviour.
.br
There is no difference for the daily job.
.SH DIAGNOSTICS
After editing /etc/anacrontab, you can run
.I journalctl -n
and
.I systemctl list-timers
to see if the timers have well been updated.
.SH "SEE ALSO"
.B systemd-crontab-generator(8), systemd.timer(5)
.SH AUTHOR
Alexandre Detiste <alexandre.detiste@gmail.com>
You can’t perform that action at this time.