# Cron to systemd OnCalendar Converter

Convert a crontab schedule into a systemd timer OnCalendar value, or an OnCalendar value back into a cron expression. Supports ranges, lists, steps, month and weekday names and the @daily style shortcuts.

## Frequently asked questions

### Why move from cron to systemd timers?

systemd timers log every run in the journal, can catch up on missed runs with Persistent=true, can add a random delay, and run jobs with the full unit options for users, limits and dependencies.

### What does an OnCalendar value look like?

Weekdays, then year-month-day, then hour:minute:second, for example Mon..Fri *-*-* 09..17:00/15:00 for every 15 minutes from 9 to 17 on weekdays. An asterisk matches every value.

### Can every cron expression be converted exactly?

Almost. One difference: when both the day of month and the day of week are set, cron runs on either match while systemd requires both. The result warns you in that case.

### How do I check the result?

Run systemd-analyze calendar with the value on a Linux machine. It prints the normalized form and the next time the timer elapses.

### Can I convert OnCalendar back to cron?

Yes. Choose systemd to cron and paste the value. Shortcuts like daily and weekly are understood. Values with a fixed year or seconds other than zero have no cron equivalent.

### What else does a timer need?

A .timer unit with the OnCalendar line in its [Timer] section and a matching .service unit that runs the command. Enable it with systemctl enable --now name.timer.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
