Cron to systemd
BetaConvert a 5-field cron schedule into systemd timer and service units plus a Kubernetes CronJob draft. Review timezone and day-field semantics before use.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
Conversion runs in the browser. Analytics and ads may load on the page.
5 fields: minute hour day-of-month month day-of-week. Example: */5 * * * * or 0 9 * * 1-5.
OnCalendar: *-*-* *:00/5:00
systemd units
# converted.timer
[Unit]
Description=Timer converted from cron */5 * * * *
Requires=converted.service
[Timer]
OnCalendar=*-*-* *:00/5:00
AccuracySec=1s
Persistent=true
Unit=converted.service
[Install]
WantedBy=timers.target
# converted.service
[Unit]
Description=Service started by converted.timer
[Service]
Type=oneshot
ExecStart=/usr/local/bin/your-command
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
name: converted
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: converted
image: busybox:1.36
command:
- /bin/sh
- -c
- "/usr/local/bin/your-command"
How to convert cron
-
Paste a 5-field expression
Example: */5 * * * * or 0 9 * * 1-5. -
Set a unit name and command
These become the timer/service names and the CronJob command. -
Copy systemd units
Copy the timer plus service pair. -
Copy CronJob YAML
Review image and command before apply.
Common Use Cases
Server Timer Migration
Kubernetes Job Draft
Schedule Review
Unit Name Cleanup
Why convert cron
FindUtils Cron to systemd converts a 5-field cron expression into a systemd timer and service pair. It also creates a Kubernetes CronJob YAML draft from the same schedule, unit name, and command.
The systemd output uses OnCalendar, Persistent=true, and AccuracySec=1s. The Kubernetes output uses a busybox starting image, a shell command, Forbid concurrency, and OnFailure restart behavior.
Conversion runs in your browser and does not install or start anything. Build a source schedule with the Cron Expression Generator, and inspect pattern fragments with the Regex Tester when required.
How it compares
systemd timers can recover missed runs with Persistent=true, while Kubernetes CronJobs run containers under cluster rules. FindUtils gives both starting files, but it cannot choose deployment policy, timezone, credentials, or the correct application image.
Use the JSON Formatter for JSON configuration output. The CronJob from this tool is YAML and still needs a Kubernetes-aware review.
Cron Migration Tips
- Use a 5-field cron expression. Six-field Quartz expressions and special names such as @daily are not supported.
- Check any schedule that sets both day-of-month and day-of-week because cron and systemd use different logic.
- Review the system timezone before you install the timer or apply the CronJob.
- Replace the generated busybox image and command with the image that contains your application job.
- Test the command separately before you enable the timer.