Cron / every day at midnight
Cron every day at midnight: 0 0 * * *
Once a day at 00:00. @daily and @midnight are crontab shortcuts for the same schedule.
The expression
0 0 * * *
In words: At 00:00.
Field by field
| Field | Value | Means |
|---|---|---|
| Minute (0–59) | 0 | minute 0 |
| Hour (0–23) | 0 | hour 0 |
| Day of month (1–31) | * | every day |
| Month (1–12) | * | every month |
| Day of week (0–6, Sunday = 0) | * | every day of the week |
Next runs
Starting from 2026-11-27 00:00 UTC:
- Sat, Nov 28, 2026, 00:00 UTC
- Sun, Nov 29, 2026, 00:00 UTC
- Mon, Nov 30, 2026, 00:00 UTC
- Tue, Dec 1, 2026, 00:00 UTC
- Wed, Dec 2, 2026, 00:00 UTC
Try other expressions and timezones in the cron expression tool.
Whose midnight?
Cron uses the timezone of whatever runs it — often UTC on servers and always UTC on GitHub Actions. Midnight UTC is 19:00 the day before in New York (EST) and 01:00 in Berlin (CET). Set the timezone explicitly when the day boundary matters, such as daily reports.
The same schedule on other platforms
Linux crontab. Edit with crontab -e. Runs in the server’s timezone unless you set CRON_TZ (cronie) or TZ.
0 0 * * * /path/to/job.sh >> /var/log/job.log 2>&1
GitHub Actions. Schedules run in UTC on the default branch, and runs can start late when GitHub is busy.
on:
schedule:
- cron: '0 0 * * *'
Kubernetes CronJob. Set timeZone (Kubernetes 1.27+) or the schedule follows the controller’s timezone, usually UTC. concurrencyPolicy: Forbid stops runs from overlapping.
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: job
image: busybox
command: ["sh", "-c", "echo running"]
AWS EventBridge Scheduler. Six fields (the last is the year); one of day-of-month or day-of-week must be ?. Pick the timezone on the schedule.
cron(0 0 * * ? *)
Wisp. Describe the job and say how often in plain words — Wisp writes the function, turns the schedule into this cron expression in your timezone, and runs it with logs and error alerts.
"Every day at midnight, fetch new orders from Shopify and post a summary to Slack."
Questions
*Is `0 0 * ` the same as `@daily`?* Yes.
How do I run just after midnight to be safe? Use 5 0 * * * (00:05) so the day has definitely rolled over and you avoid the midnight rush.
Try any expression in the cron tool · Run it on a schedule with Wisp