systemd OnCalendar โ cron
Translate timer schedules between systemd and cron, with next run times and clear reasons when an exact conversion is impossible.
Next runs (UTC)
Translating between cron and systemd timers
Modern Linux distributions use systemd timers alongside, or instead of, cron. Timers add logging through the journal, dependency handling, catch-up after downtime (Persistent=true) and randomised delays. They also use a different schedule syntax, OnCalendar, so moving a crontab line to a timer means rewriting its schedule, and doing it by eye is how weekday and day-of-month bugs creep in.
Paste an OnCalendar expression to get the closest cron expression, a plain-English description and the next runs, or paste a cron expression to get the OnCalendar equivalent. The converter checks the result by comparing run times: it only produces an answer when both systems would fire at exactly the same moments, and explains why when they would not.
When a conversion is refused
- Day of month and weekday together.
0 0 1 * 1in cron means the 1st or any Monday; the systemd expressionMon *-*-01means a Monday that is also the 1st. They are different schedules, so the tool asks you to use two timers. - Seconds. Cron has a one-minute resolution, so an expression that fires at several seconds cannot be written in it. Use the Quartz or Spring cron builders, which have a seconds field.
- Years and "last day of the month". Standard cron has neither a year nor a way to say the last day.
The behaviours follow the systemd.time manual page (shortcut expansions, ~ for days counted from the end of the month, repetition values). When you deploy, confirm with systemd-analyze calendar on the target system. Everything runs in your browser.
Frequently asked questions
What is the format of OnCalendar?
DayOfWeek Year-Month-Day Hour:Minute:Second, where every part is optional. Mon..Fri *-*-* 09:00:00 means every weekday at nine. A missing time means midnight and a missing date means every day. Shortcuts such as daily, weekly and monthly expand to full expressions.
How is OnCalendar different from cron?
The most important difference: when both a weekday and a day of the month are given, systemd requires both to match (AND), while cron runs when either matches (OR). Also, systemd supports seconds, a year, time zones and counting days from the end of the month; cron does not.
How do I test an expression?
Run systemd-analyze calendar "Mon..Fri *-*-* 09:00" on a Linux machine. It prints the normalized form and the next elapse time. This tool shows the next runs in UTC so you can check an expression without a server.
What does */15 mean in OnCalendar?
In the minute field, *:0/15 or *:00/15 means minutes 0, 15, 30 and 45, starting at 0 and repeating every 15. The value before the slash is the start of the repetition.