systemd-crontab-generator(8)

systemd-crontab-generator8

Translate cron schedules in systemd units

Usage

/usr/lib/systemd/system-generators/systemd-crontab-generator output-dir

Overview

systemd-crontab-generator is a systemd.generator(7) translating classic cron FILES into native systemd.timer(5)/systemd.service(5) pairs.

It runs automatically

  • during early boot,

  • a second time by cron-after-var.service if /var is a separate mount-point, in order to process user crontabs in /var/spool/cron/crontabs,

  • after each update to /etc/crontab† and /etc/anacrontab†, and

  • when packages add files under /etc/cron.d†

(†: monitored by cron-update.path).

Files

/etc/crontab

Administrator's system crontab, see crontab(5).

/etc/cron.d

System crontabs managed by packages live here.

/etc/anacrontab

anacrontab(5)

/var/spool/cron/crontabs

Users' crontabs live here.

/run/systemd/generator

Automatically generated units go here.

/run/crond.reboot

If this file exists, @reboot jobs aren't re-generated. Managed automatically.

/var/lib/systemd/timers

systemd.timer(5)s with the Persistent flag set store their timestamps here.

Diagnostics

systemctl list-timers shows an overview of current timers and when they'll elapse.

If you see something to the effect of

/usr/lib/systemd/system-generators/systemd-crontab-generator failed with error code 1.

in the journal, you can run /usr/lib/systemd/system-generators/systemd-crontab-generator /tmp/test for more verbose output.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10–11
  4. 12
  5. 13

From systemd-cron 2.5.1-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.