Cron to systemd Timer Converter
Paste a cron expression and get matching .service and .timer unit files.
Client-side only — nothing leaves your browser
Every 15 minutes
Used as myjob.service and myjob.timer
Leave blank to inherit systemd's default
Use an absolute path. systemd does not source your shell PATH.
[Unit]
Description=Run myjob
[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup.sh
[Unit]
Description=Timer for myjob
[Timer]
OnCalendar=*-*-* *:00/15:00
Persistent=true
Unit=myjob.service
[Install]
WantedBy=timers.target
# Save the files (system-wide)
sudo nano /etc/systemd/system/myjob.service
sudo nano /etc/systemd/system/myjob.timer
# Reload systemd, then enable and start the timer
sudo systemctl daemon-reload
sudo systemctl enable --now myjob.timer
# Verify
systemctl list-timers myjob.timer
systemctl status myjob.timerWhat is a systemd Timer?
A systemd timer is a unit file that triggers another systemd unit (usually a service) on a schedule. Timers are systemd's modern replacement for cron jobs on Linux distributions that use systemd as their init system — including Ubuntu, Debian, Fedora, Arch, RHEL, CentOS Stream, and most container base images. A timer requires two files: a .timer unit that defines when to run, and a matching .service unit that defines what to run.
Cron to OnCalendar Mapping
The OnCalendar= directive uses a DOW YYYY-MM-DD HH:MM:SS format. Here is how common cron expressions translate:
| Cron | OnCalendar | Meaning |
|---|---|---|
| * * * * * | *-*-* *:*:00 | Every minute |
| */5 * * * * | *-*-* *:0/5:00 | Every 5 minutes |
| 0 * * * * | hourly | Every hour at :00 |
| 0 0 * * * | daily | Every day at midnight |
| 0 3 * * * | *-*-* 03:00:00 | Every day at 3:00 AM |
| 0 9 * * 1-5 | Mon..Fri *-*-* 09:00:00 | Weekdays at 9:00 AM |
| 0 0 * * 0,6 | Sat,Sun *-*-* 00:00:00 | Weekends at midnight |
| 0 0 1 * * | monthly | 1st of every month at midnight |
| @reboot | OnBootSec=1min | After boot completes |
| @yearly | yearly | January 1 at midnight |
Why use systemd Timers Instead of Cron?
| Capability | cron | systemd timer |
|---|---|---|
| Logs in journal | No (separate cron.log) | Yes (journalctl) |
| Catch up on missed runs | No (anacron only) | Yes (Persistent=true) |
| Random delay (jitter) | No | Yes (RandomizedDelaySec) |
| Resource limits | No | Yes (cgroups) |
| Dependencies on other units | No | Yes (After=, Requires=) |
| Granularity | 1 minute | 1 microsecond |
Useful systemd Timer Commands
| Command | What it does |
|---|---|
| systemctl list-timers | Show all active timers and their next run times |
| systemctl list-timers --all | Include inactive timers as well |
| systemctl status myjob.timer | Inspect a specific timer |
| systemctl start myjob.service | Trigger the job manually right now |
| journalctl -u myjob.service | View output and logs from past runs |
| systemd-analyze calendar "Mon..Fri 09:00" | Validate an OnCalendar expression and preview next runs |
Frequently Asked Questions
What is a systemd timer?
Should I use systemd timers or cron?
Where are systemd timer files stored?
What does Persistent=true do in a systemd timer?
Why is my systemd timer not triggering?
Related Tools
Need to manage SSH connections?
SSH Workbench lets you connect, browse files, and manage servers visually.
Try SSH Workbench Free