All tools Developer

systemd Timer Generator

Generate .service and .timer unit files for scheduled jobs on Linux.

Install

Place both files in /etc/systemd/system/, then run:

  1. sudo systemctl daemon-reload
  2. sudo systemctl enable --now my-backup.timer
  3. systemctl list-timers

Runs in your browser. Nothing you open or type here is uploaded.

How to use

  1. Name the unit and enter the ExecStart command the job should run.
  2. Fill in the service options you need: description, type, restart, user, working directory, environment variables.
  3. Set the timer trigger: a calendar preset or a custom OnCalendar value, or monotonic values such as OnBootSec and OnUnitActiveSec.
  4. Download the .service and .timer files and install them with the commands shown below.

Details

On systemd-based Linux systems, a scheduled job is a pair of unit files: a .service that describes what to run, and a .timer that describes when. Calendar timers fire at wall-clock times, like cron. Monotonic timers are relative to events, for example five minutes after boot or one hour after the last run. This tool generates both files from one form, including Persistent (catch up runs missed while the machine was off), RandomizedDelaySec and AccuracySec. Place both files in /etc/systemd/system/, then enable the timer, not the service.

  • Install with sudo systemctl daemon-reload, then sudo systemctl enable --now <name>.timer. List upcoming runs with systemctl list-timers.
  • A custom OnCalendar value overrides the presets. The format is systemd calendar syntax, for example Mon *-*-* 03:00 for Mondays at 03:00.
  • Persistent only applies to calendar timers: it runs a missed job once at the next boot or activation.

Common questions

Where do the files go?

Copy each output to /etc/systemd/system/<name>.service and <name>.timer, then run sudo systemctl daemon-reload and sudo systemctl enable --now <name>.timer.

Calendar or monotonic?

Calendar runs at wall-clock times (like cron). Monotonic is relative to events — OnBootSec for "5 minutes after boot", OnUnitActiveSec for "every hour after the last run".

What does Persistent do?

If the machine was off when the timer should have fired, Persistent runs the missed job immediately at the next opportunity.