Cron to systemd: Convert Crontab to Timers and CronJobs
Paste a 5-field cron line, set a unit name and command, then copy systemd units and CronJob YAML. Conversion stays in your browser. The job does not run.
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
# 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
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"
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.
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.