Skip to content

Cron to systemd Converter · Scheduling

Move a crontab line to a systemd timer.

Paste a single crontab entry to generate a systemd .timer and .service pair with an OnCalendar= expression and migration notes — free, online, no signup required.

Runs in your browser No signup Free & open Updated Jul 28, 2026

Cron to systemd Converter playground

Base name for the generated .timer and .service units. Optional.
crontab

Tip: press Esc to release focus.

OnCalendar
timer.timer
service.service
Notes

Paste a crontab line, then convert to see the equivalent systemd .timer and .service units, plus any migration notes here.

The Gap

systemd is the new crontab.

Modern Linux distributions schedule jobs with systemd timers, and many no longer ship a per-user cron daemon at all. Timers give you journald logging, dependency ordering, resource limits, retries and Persistent=true for missed runs — things a bare crontab line can’t express.

But the syntax is unfamiliar, and rewriting a schedule by hand into OnCalendar= across two unit files is fiddly and easy to get subtly wrong. This converter does the mechanical part for you — paste a crontab line to migrate it to systemd timer units in seconds — and calls out the handful of behaviours — environment, MAILTO, working directory — that do not translate one-to-one, so the migration is honest rather than silent.

Need to read the cron side first? Try the Cron Expression Tester, then convert it here — or jump straight to the live playground above.

The Pipeline

How it works.

Five deterministic steps turn one crontab line into an installable pair of units — all inside your browser tab, every time.

  1. Parse the line.

    Your crontab entry is split into the five time fields (or an @macro) and the command that follows.

  2. Build OnCalendar.

    The time fields are rewritten into a systemd OnCalendar= calendar expression, lists and steps included.

  3. Emit the units.

    A .timer carrying the schedule and a .service wrapping your command are generated as a matched pair.

  4. Flag the gaps.

    Anything cron does that systemd handles differently — env, MAILTO, working dir — surfaces as a note.

  5. Copy & install.

    Drop the two units in place, then enable and start the timer. The next runs show in list-timers.

The Mapping

One line in, two units out.

The converter reads a standard crontab entry — five time fields plus a command, or an @macro — and emits a systemd .timer paired with a .service.

The crontab line

The five fields are minute, hour, day-of-month, month and day-of-week, followed by the command. Lists (1,15), ranges (1-5), steps (*/10) and @macros are all understood.

crontab
# Run the nightly backup every day at 03:00
0 3 * * *  /usr/local/bin/backup.sh

The .timer unit

Carries the schedule as an OnCalendar= expression. Persistent=true means a run missed while the machine was off fires on the next boot — closer to how operators expect a backup job to behave.

backup.timer
[Unit]
Description=Run backup.sh (migrated from crontab)

[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true

[Install]
WantedBy=timers.target

The .service unit

Wraps your command. Type=oneshot fits a run-to-completion job, and ExecStart= holds the command from the crontab line. Add Environment= or User= here as needed.

backup.service
[Unit]
Description=backup.sh (migrated from crontab)

[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup.sh

Installing the Units

Three commands to go live.

Copy both units, drop them in /etc/systemd/system/, reload the daemon, then enable and start the .timer — never the service directly. The timer is what schedules the run.

Once enabled, systemctl list-timers shows the next firing time, and journalctl -u backup.service tails the output the old MAILTO would have emailed you.

install.sh
# Drop the units in place, then enable the timer
$ sudo cp backup.timer backup.service /etc/systemd/system/
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now backup.timer

# Confirm the next scheduled run
$ systemctl list-timers backup.timer

Before You Cut Over

A note on parity: the generated units cover the common case — schedule, command and missed-run handling. A few cron behaviours have no direct OnCalendar= analogue and appear as migration notes instead: per-line environment assignments (move to Environment= / EnvironmentFile=), MAILTO email-on-output (use journald or an OnFailure= handler), and the implicit working directory (set WorkingDirectory=). Review the notes, then run the timer once with systemctl start to confirm before you remove the original crontab line.

FAQ

Questions, answered.

Tap a question to expand the answer.

It takes a single crontab line — the five time fields plus the command — and generates an equivalent systemd setup: a .timer unit with an OnCalendar= expression that matches your schedule, and a .service unit that runs your command. It also lists migration notes that flag anything systemd handles differently, like the implicit working directory or environment. Everything is computed in your browser.

No. The converter runs 100% client-side. Your cron line and command are parsed and translated in your browser tab — nothing is uploaded to a server, and there is no account or signup. It is safe to paste internal commands and paths.

A crontab field set is rewritten into systemd's OnCalendar= calendar syntax — for example “0 3 * * *” becomes “*-*-* 03:00:00” (daily at 03:00). Lists, ranges and step values map to their OnCalendar equivalents, and common @macros like @daily and @hourly map to their canonical timer forms. After installing the timer you can confirm the next runs with “systemctl list-timers”.

Timers give you structured logging through the journal (journalctl -u your.service), dependency ordering, resource limits, automatic retry and accurate-vs-monotonic scheduling, plus Persistent=true so a missed run can fire on next boot. They are the native scheduling primitive on modern systemd Linux distributions, where the per-user crond is often not even installed.

A few cron behaviours have no direct OnCalendar= analogue and surface as migration notes instead — non-standard or vendor cron extensions, MAILTO email-on-output (use journald or an OnFailure= handler), and per-line environment assignments (move these to Environment= or an EnvironmentFile= in the .service). The converter flags these so nothing silently changes meaning.

No. This is an independent, community utility and is not affiliated with or endorsed by the systemd project or any cron implementation. It models the standard crontab and systemd unit formats for familiarity and names them only to describe what it converts.

@reboot has no OnCalendar= equivalent and maps to OnBootSec=1min in the [Timer] section, so the job fires once shortly after each boot. @hourly expands to OnCalendar=*-*-* *:00:00, @daily to OnCalendar=*-*-* 00:00:00, @weekly to OnCalendar=Sun *-*-* 00:00:00, @monthly to OnCalendar=*-*-01 00:00:00, and @yearly to OnCalendar=*-01-01 00:00:00. The converter handles all of these automatically and notes the @reboot special case.

Add Persistent=true to the [Timer] section alongside your OnCalendar= line. systemd records the last trigger time on disk and, if the scheduled time passed while the machine was down, runs the job immediately on the next boot. The converter always includes Persistent=true in the generated .timer unit so this behaviour is on by default.

For system-wide jobs place both units in /etc/systemd/system/, then run sudo systemctl daemon-reload and sudo systemctl enable --now yourjob.timer. Enable the .timer unit — not the .service directly, since the timer is what controls the schedule. For per-user jobs place them in ~/.config/systemd/user/ and use systemctl --user enable --now yourjob.timer instead.

Run systemd-analyze calendar “<expression>” to validate the syntax and see when the expression will next elapse — for example systemd-analyze calendar “*-*-* 03:00:00”. Once the timer is installed, systemctl list-timers shows every active timer with its last and next run times, and journalctl -u yourjob.service streams the job output.

More free, private DevOps tools.

The Cron to systemd Converter is one tool in OpsCanopy — a growing canopy of browser-based validators, converters and testers that never touch a server.

29 free tools, every one offline-capable — opscanopy.com works with no signup and nothing uploaded.

Working with schedules? Pair this with the Cron Expression Tester to read a cron line in plain English first, or browse the full tools directory.

Not affiliated with or endorsed by the systemd project or any cron implementation. Format names are used only to describe what this tool converts.