Systemd Timer Generator
Generate a production-ready .timer + .service pair to replace cron jobs. Convert cron schedules to OnCalendar, or use interval timers (OnBootSec / OnUnitActiveSec). Everything runs in your browser.
Basics
<name>.timer and <name>.service.[Unit] section.<name>.service.[Timer] OnCalendar schedule
daily, hourly, Mon..Fri 02:00:00, *:0/15 (every 15 min).OnCalendar= lines.Timer options
300 seconds).[Service] What to run
root when possible.Environment= directive.Generated unit files
Install & test
Save the files to /etc/systemd/system/, then:
sudo systemctl daemon-reload sudo systemctl enable --now example.timer systemctl list-timers --all | grep -i example # Test your schedule: systemd-analyze calendar "daily"
View logs with journalctl -u <name>.service. (You enable the timer, not the service.)
Frequently Asked Questions
When should I use OnCalendar vs interval timers?
Use OnCalendar for wall-clock schedules like “every day at 02:00” or “Mondays at 9am”. Use interval timers (OnBootSec, OnUnitActiveSec) for “every N minutes” style jobs when you don’t care about the exact wall clock.
Why do people prefer systemd timers over cron?
Systemd timers integrate with the service manager: dependency ordering, centralized logs (journalctl), per-unit resource limits, and features like Persistent=true (catch up on missed runs) and RandomizedDelaySec (jitter).
How do I validate my unit files?
You can validate syntax with systemd-analyze verify /etc/systemd/system/<name>.timer and check when the timer will trigger with systemd-analyze calendar. Then inspect runtime status with systemctl status.
Can I convert any cron schedule to OnCalendar?
Most common cron schedules convert cleanly. Some advanced expressions (like complex ranges/steps) may need manual tweaks or multiple OnCalendar= lines. Always verify with systemd-analyze calendar.