Cron expression for Every 12 hours
0 */12 * * *
Runs twice a day, at midnight and noon.
Next 5 runs (your local time)
These are shown in your browser’s timezone. The job itself runs in the scheduler’s timezone — often UTC — so the real run time can differ.
What people actually schedule with 0 */12 * * *
- Dependency and container-image vulnerability scans
- Refreshing OAuth tokens that expire daily (12h gives you one retry window)
- Mirror syncs of package repos or static datasets
Use 0 */12 * * * on your platform
It’s the same 5-field expression everywhere — what changes is where you put it and which timezone it runs in.
Linux / crontab
0 */12 * * * /path/to/your-command
Runs in the server’s local timezone — check it with timedatectl.
Full field reference: crontab(5) man page.
GitHub Actions
on:
schedule:
- cron: "0 */12 * * *"
GitHub Actions always runs scheduled jobs in UTC — there is no timezone setting, and runs can be delayed under load (official docs).
Kubernetes CronJob
spec:
schedule: "0 */12 * * *"
Defaults to UTC. Set spec.timeZone (Kubernetes 1.27+)
for a specific zone — see the
CronJob docs.
Quartz / Spring @Scheduled
Quartz uses 6 fields (seconds first): 0 0 */12 * * *. Watch out:
Quartz day-of-week is 1=SUN … 7=SAT (not 0–6), and day-of-month /
day-of-week use ? — double-check if your schedule touches those fields
(Quartz cron reference).
Gotchas with every 12 hours schedules
- Midnight and noon are both popular slots — you inherit two daily congestion spikes.
0 4,16 * * *is the same promise without the queue. - A mirror sync that occasionally takes 13 hours will overlap itself.
flockturns that into a skipped run — almost always the better failure. 0 */12and0 0,12 * * *are identical; the second tells the next engineer exactly when it fires without mental math.
Will you know if this job silently fails?
Cron jobs fail quietly — a server reboots, a path changes, or an error code is ignored — and nobody notices until the data is missing. A cron monitor (a dead-man’s-switch) alerts you when a scheduled job does not check in on time.
Monitor your cron jobs with UptimeRobot →
Disclosure: this is an affiliate link — we may earn a commission if you sign up, at no extra cost to you.
Is 0 */12 * * * the right schedule?
If once a day is honestly enough, daily at midnight (or better, 3am). Tighter freshness goes to every 6 hours.
Or use the interactive cron generator & explainer, read the complete cron syntax guide, or pick another common schedule: