π‘ Midnight is the busiest time for scheduled jobs. If the exact time doesn't matter, a time like 03:17 avoids contention.
In plain English
At 00:00 every day.
Next runs (UTC):
- Mon 7 Dec 2026, 00:00
- Tue 8 Dec 2026, 00:00
- Wed 9 Dec 2026, 00:00
- Thu 10 Dec 2026, 00:00
- Fri 11 Dec 2026, 00:00
crontab
0 0 * * * /path/to/command
Add it with crontab -e. It runs in the server's local time zone (usually UTC on servers).
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
name: my-job
spec:
schedule: "0 0 * * *"
timeZone: "Etc/UTC"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: my-job
image: busybox:1.36
command: ["sh", "-c", "echo Hello from my-job"]
timeZone is supported from Kubernetes 1.27. Without it, the schedule uses the
controller manager's time zone (usually UTC). concurrencyPolicy: Forbid stops a slow run
overlapping the next one.
GitHub Actions
on:
schedule:
- cron: '0 0 * * *'
Scheduled workflows run in UTC, on the latest commit of the default branch. Runs can start late or be
dropped when GitHub is busy, so avoid relying on exact timing.
systemd timer
[Unit]
Description=Run my-job on a schedule
[Timer]
OnCalendar=*-*-* 00:00:00
Persistent=true
[Install]
WantedBy=timers.target
Save it as my-job.timer next to a my-job.service, then run
systemctl enable --now my-job.timer. Check the schedule with
systemd-analyze calendar "*-*-* 00:00:00". Times use the server's local time zone
unless you add one to the end, e.g. *-*-* 00:00:00 Europe/London.
AWS EventBridge
cron(0 0 * * ? *)
EventBridge uses six fields (the last is the year), numbers days of the week 1β7 from Sunday, and needs
? in either the day-of-month or day-of-week field. Rules run in UTC; EventBridge Scheduler
lets you choose a time zone.
Cron syntax explained
A standard cron expression has five fields, separated by spaces:
ββββββββββββββ minute (0β59)
β ββββββββββββββ hour (0β23)
β β ββββββββββββββ day of month (1β31)
β β β ββββββββββββββ month (1β12 or JANβDEC)
β β β β ββββββββββββββ day of week (0β6 or SUNβSAT; 7 is also Sunday)
β β β β β
* * * * *
| Symbol | Meaning | Example |
* | Every value | * * * * *: every minute |
, | A list of values | 0 9,17 * * *: 09:00 and 17:00 |
- | A range | 0 9 * * 1-5: weekdays at 09:00 |
/ | A step | */15 * * * *: every 15 minutes |
How the formats differ
| Format | Fields | Time zone | Watch out for |
| crontab | 5 | Server's local time | Day-of-month and day-of-week are OR'd when both are set |
| Kubernetes CronJob | 5 | timeZone field (1.27+) | Missed runs and overlap: set concurrencyPolicy and startingDeadlineSeconds |
| GitHub Actions | 5 | UTC | Minimum 5 minutes; runs can be delayed or dropped |
| systemd timer | OnCalendar | Local, or a zone at the end | Every part of a line must match; use Persistent=true to catch up missed runs |
| AWS EventBridge | 6 (adds year) | UTC (Scheduler: any) | Days of week are 1β7 from Sunday; one day field must be ? |