systemd Timer to Cron Expression Converter

Paste the OnCalendar line from a systemd timer and get the equivalent cron expression. The shorthands such as daily and hourly, the minute steps like *:0/15, the weekday forms and the fixed date forms are all understood, and the notes panel spells out where systemd and cron genuinely behave differently.

systemd OnCalendar schedule

cron expression


            
            

Ready — paste some input or load the sample.

100% Client-Side · Privacy First. This tool runs entirely inside your browser. Nothing you type is uploaded, logged or sent to a server — you can even use it offline.

Overview

Systemd timers and cron express schedules differently, and moving a job from one to the other is rarely a straight copy. A systemd timer can say hourly, daily, weekly, monthly or quarterly as a single word; it can express a minute step with *:0/15; and it can combine a weekday with a date such as Mon *-*-* 03:00:00. Cron needs all of that flattened into five numeric fields. This converter performs that translation and then explains the semantic differences that bite people after the migration: systemd fires at the first matching second while cron fires at the start of the minute, systemd requires a date and a weekday to both match while cron fires when either one matches, and Persistent=true makes a timer catch up a run that was missed while the machine was down. It is the companion to the cron explainer on this site, so you can move a schedule across and immediately check the next run times.

How to use the systemd timer to cron expression converter

  1. 1Open the timer unit and read its OnCalendar= line.
  2. 2Paste the whole line, or just the calendar expression, into the input panel.
  3. 3Read the cron expression in the output panel.
  4. 4Read the notes, because they list the differences that matter for your particular timer.
  5. 5Add the expression to a crontab with crontab -e and verify the next run times with the cron explainer.
  6. 6Keep a comment next to each crontab line that names the unit it came from, because a crontab line cannot say that by itself.

Cheat sheet

The syntax you will use most, and what each part does.

PatternWhat it means
OnCalendar=daily Becomes 0 0 * * *, which is midnight every day in the local timezone.
OnCalendar=hourly Becomes 0 * * * *, so it fires at the start of every hour.
OnCalendar=*:0/15 Becomes */15 * * * *, a quarter-hour step that starts on the hour.
OnCalendar=Mon *-*-* 03:00:00 Becomes 0 3 * * 1 — every Monday at 03:00.
OnCalendar=*-*-* 03:00:00 Becomes 0 3 * * *, every day at 03:00.
OnCalendar=weekly Becomes 0 0 * * 0, with 0 meaning Sunday in the cron day-of-week field.

Common mistakes

The job never runs after a reboot.

systemd timers only catch up on missed runs when Persistent=true is set. Cron has no equivalent, so decide whether you need the catch-up behaviour.

The schedule fires at the wrong time after the migration.

Cron uses the timezone of the crontab daemon while systemd uses the machine timezone unless you set Timezone= in the unit.

A date and a weekday that both match do not fire twice.

Systemd requires both the date and the weekday to match, while cron fires when either one matches.

The seconds are lost.

Cron has no seconds field, so a schedule with a specific second is rounded down to the start of that minute.

Worked examples

A systemd shorthand

[Timer]
OnCalendar=daily
Persistent=true

The cron expression 0 0 * * *, with a note that daily maps to midnight local time.

A minute step timer

[Timer]
OnCalendar=*:0/15
Unit=acme-sync.service

The cron expression */15 * * * *, equivalent to running at minutes 0, 15, 30 and 45.

Frequently asked questions

Does it read my timer unit files?

No. It only reads what you paste, so the unit file stays on your machine. Paste the OnCalendar line, or the whole timer section if you want the surrounding lines ignored.

What systemd formats are supported?

The shorthands daily, hourly, weekly and monthly, the minute step forms such as *:0/15, the weekday forms such as Mon, the fixed date forms such as 2026-01-31, and the combined expressions such as "Mon *-*-* 03:00:00".

Why is the result always five fields?

Because that is the portable cron format. It works in a crontab, in a Kubernetes CronJob and in most of the managed schedulers that replaced cron on Linux servers.

Will the job behave identically after the conversion?

Not always. A systemd timer fires at the first matching second while cron fires at the start of the minute, and systemd matches the day of month and the day of week with AND while cron uses OR when both are restricted. The notes list exactly which difference applies to your timer.

What does Persistent=true do in systemd?

It makes the timer catch up on a run that was missed while the machine was off. Cron has no equivalent, so the job simply does not run for the missed window after a reboot.

Are the seconds lost?

Yes, and that is the point. Cron has no seconds field, so a timer that fires at 30 seconds past the minute becomes a job that fires at the start of that minute.

Which timezone does the systemd timer use?

The local timezone of the machine, unless the unit sets a different one. Cron has the same rule, so the conversion does not change the timezone, but it is worth making it explicit in both places.

Can I convert several timers at once?

Convert them one at a time, because a crontab line has no way to express the unit that a timer belongs to. Keep a comment next to each line in the crontab to remember which service it belongs to.

What happens to a timer that fires more than once a day?

Several OnCalendar lines become several cron lines, one for each time of day, so the job still runs at every moment the timer would have fired.

How do I handle a timer that uses a random delay?

There is no cron equivalent, because cron has no way to express a randomised offset. Use a fixed time and move the jitter into the command itself.

Does the conversion change the day of the week rule?

It can. systemd requires the day of month and the day of week to match together, while cron fires when either of them matches, so a timer that names both days behaves differently after the conversion.