Cron ⇄ systemd Timer Converter

Convert a cron line to a systemd timer — or an OnCalendar value back to cron — and prove the two schedules match with a next-100-runs table before you switch anything over.

Cron and systemd timers do not mean the same thing by a schedule. When a cron line restricts both the day of the month and the day of the week, crontab(5) runs the job when either matches; when an OnCalendar value names both a weekday and a date, systemd.time(7) requires both to match. Convert the line naively and a job silently runs twice as often — or half as often. This tool converts both ways and then proves the result: it computes the next 100 firings of each side from the same start time and shows the first 10 side by side, with DST-transition days flagged. If the schedules differ, the verdict says so. The sibling systemd unit auditor checks the unit the timer triggers, and the companion article from cron to systemd timers walks through a safe migration.

Last updated:

Both sides are computed from this time, in your local time zone (or the timer’s Timezone=, when one is set).

Persistent=true catches up firings missed while the machine was off, at the next boot. It changes runtime behaviour, so it is a checkbox, not a silent default — the download includes it unless you untick the box.

🔒 Your expressions are converted in your browser and never leave your device. No account, no upload, no server call.

What happens to what you paste

Nothing leaves your browser. The expressions are parsed locally by JavaScript on this page: no upload, no server call, no storage, no account. That matters because a crontab line names real jobs and paths — infrastructure detail that should never be pasted into a chat or a server-side checker. Closing the page discards it.

What this proof does NOT prove

The proof compares schedules as computed from the text you pasted — it does not run anything. It cannot see your machine’s clock or time zone, whether the timer is enabled, or whether cron is even installed. AccuracySec, RandomizedDelaySec and Persistent shift real timer firings by seconds or catch up missed ones; this page does not simulate them. Check systemctl list-timers and your crontab on the machine for the real schedule.

Two extensions are accepted that strict Vixie crontab(5) does not allow: ranges and lists of names (mon-fri, jan,mar), and the @daily/@weekly/@monthly/@yearly/@annually shortcuts, which the man page lists as extensions, not POSIX. Most Linux crons accept both, but if your cron is strict, check the converted line on the machine before relying on it.

@reboot has no true timer equivalent. OnBootSec= is the closest analogue — it fires once, a delay after boot — but boot time is not cron-daemon start time, so the two are not identical, and this tool says so instead of converting it.

How the conversion works

The trap is the day rule. crontab(5): if both the day-of-month and day-of-week fields are restricted (neither is *), the command runs when either field matches. systemd.time(7): an OnCalendar value with both a weekday and a date fires only when both match. So 0 0 15 * 5 runs on the 15th and on every Friday in cron — but Fri *-*-15 00:00 runs only on Friday the 15th. This tool never emits that single line: it emits two OnCalendar lines (one for the 15th, one for Fridays) and flags the result as a union.

DST and month ends are where the two sides visibly diverge. A wall-clock time that does not exist — 02:30 on the spring-forward day — never fires on either side: it is skipped and counted, never silently moved. A wall time that occurs twice (the repeated hour at fall-back) is read as its first occurrence on both sides, so the comparison stays like-for-like; Vixie cron’s own fall-back behaviour is not stated in crontab(5), and this page does not certify it. A 31st skips months that have no 31st, and 29 February fires only in leap years — on both sides.

The proof computes the next 100 firings of each side from the same “compare from” time, in the same time zone, and compares instants — not text. The table shows the first 10 rows (local time and UTC, with DST-transition days flagged); the verdict covers all 100. “Identical” means the two schedules fire at the same instants for the next 100 firings. It does not mean the job will behave the same at runtime: it says nothing about what the job does, how long it takes, or what happens when a firing is missed.

Frequently asked questions

Why does 0 0 15 * 5 become two OnCalendar lines?

Because cron and OnCalendar disagree about what “both day fields” means. In cron the 15th and Fridays are alternatives (OR): the job runs on the 15th and on every Friday. In OnCalendar a weekday and a date are conditions (AND): one line can only express “Friday the 15th”. Two lines — one for the 15th, one for Fridays — are the exact union, and the proof table confirms it: 100 firings, identical. One line would silently drop most of the firings.

The verdict says “identical”. Will the job run at the same times on my server?

The schedules match; the runtime may still differ. The proof compares firing instants computed from the text, in your browser’s time zone. On the server, the timer fires in the machine’s time zone (unless the OnCalendar value pins one), AccuracySec and RandomizedDelaySec shift firings, and Persistent=true catches up firings missed while the machine slept. Identical schedules, different runtime behaviour — check systemctl list-timers after installing the unit.

Why does the first-Monday timer have no cron equivalent?

Because “the first Monday of the month” is a weekday AND a date range: Monday, and the 1st to the 7th. OnCalendar expresses AND directly (Mon *-*-01..07 09:00). Cron has no AND for its two day fields — a cron line with both fields restricted means OR, so 0 9 1-7 * 1 would fire on the 1st to the 7th and on every Monday. There is no single cron line for it; the tool lists the timer line as-is instead of guessing.