ANACRONTAB(5)

NAME
/etc/anacrontab - monotonic jobs

DESCRIPTION
The file /etc/anacrontab follow the rules previously set by anacron(8).

Lines starting with '#' are comments.

Environment variables can be set using VAR=VALUE keypairs.

The special RANDOM_DELAY (in minutes) environment variable is translated to AccuracySec=. The special START_HOURS_RANGE (in hours) environment variable is translated to the 'hour' component of 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:

period delay job-identifier command

*   period is a number of days to wait between each job execution, or special values @daily, @weekly, @monthly, @yearly

*   delay is a number of extra minutes to wait before starting job. It is translated in OnBootSec=

*   job-identifier is a single word. systemd-crontab-generator uses it to construct the dynamic unit names: cron-<job-identifier>-root-0.timer and matching cron-<job-identifier>-root-0.service

*   command is the command that is run by a shell

BUGS
systemd-crontab-generator doesn't support multiline commands.

Any period greater than 30 is rounded to the closest month

There are subtle differences on how anacron & systemd handle persistente timers: anacron will run a weekly job at most once a week, with always 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.
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.
There is no difference for the daily job.

DIAGNOSTICS
After editing /etc/anacrontab, you can run journalctl -n and systemctl list-timers to see if the timers have well been updated.

SEE ALSO
systemd-crontab-generator(8), systemd.timer(5)

AUTHOR
Alexandre Detiste <alexandre.detiste@gmail.com>