Skip to content
100% local

Cron to systemd timer

Turn a cron expression into a ready-to-use systemd .timer and .service unit pair.

Input
Output

Cron to systemd timer

Paste a cron expression — the kind you'd put in a crontab, like `0 3 * * *` or `*/15 9-17 * * 1-5` — and this tool converts it into a systemd `OnCalendar=` value, then assembles the complete `.timer` unit and its matching `.service` unit around it. Migrating a server from cron to systemd usually means doing this translation by hand for every job; this does it instantly and correctly, including the field expansion for steps and ranges.

Set the unit name and the command to run, and optionally the user and working directory the service should use. Randomized delay adds `RandomizedDelaySec=` so a fleet of servers doesn't all wake up at once; Persistent adds `Persistent=true` so a run missed while the machine was off fires as soon as it's back. A time zone appends an IANA zone name to every schedule line instead of relying on the system's local time. Paste several cron lines at once to build one timer with several `OnCalendar=` entries — handy for a job that used to have more than one crontab line.

Turn on the plain-language description to get a one-line comment above each schedule explaining when it runs, in your own language. The tool also watches for the one cron construct systemd genuinely can't reproduce: when both day-of-month and day-of-week are restricted, cron treats them as OR while systemd's OnCalendar always ANDs them — when that happens, a warning comment is added so the mismatch doesn't ship silently. An out-of-range field or an expression with the wrong number of fields is reported as a plain error instead of guessed at.

Everything runs in your browser — the cron expression and the unit file never leave your device. Copy the result, download it as a .txt file to drop into `/etc/systemd/system/`, or send it to another tool to keep working on it.

FAQ

Why does the output include two units?
A systemd timer only schedules; it needs a matching .service unit to actually run the command. The tool generates both, linked together with Unit=.
Can I convert more than one cron line at once?
Yes. Paste several expressions, one per line, and they become multiple OnCalendar= entries in a single timer unit for the same command.
What does the day-of-month/day-of-week warning mean?
cron fires when either field matches if both are restricted; systemd's OnCalendar requires both to match. The tool warns you when this changes the schedule instead of converting it silently.
Does it support @daily, @hourly and the other cron macros?
Yes, along with @weekly, @monthly, @yearly and @annually/@midnight, expanded to their standard five-field equivalents before conversion.
Is my cron expression or command uploaded anywhere?
No. The conversion runs entirely in your browser — nothing you type is sent to a server.