Cron expression for every 12 hours
0 */12 * * *Every 12 hours, on the hour.
Runs twice a day, at midnight and noon.
Try it and tweak it
Change any field below and the preview updates. Set the time zone to match your server.
✓ Valid cron
Every 12 hours, on the hour.
Next 10 runs
Calculating in your browser…
Times are computed in your browser for the selected zone and are informational. The server that runs the job uses its own zone (often UTC) and cron flavour, so verify there.
Same schedule in other dialects
Unix crontab
0 */12 * * *Quartz
0 0 */12 * * ?Spring @Scheduled
0 0 */12 * * ?AWS EventBridge
cron(0 */12 * * ? *)Variations
0 6,18 * * * | Twice a day at 06:00 and 18:00 |
In other schedulers
| crontab line | 0 */12 * * * /path/to/command |
| Quartz | 0 0 */12 * * ? |
| Spring | @Scheduled(cron = "0 0 */12 * * ?") |
| AWS EventBridge | cron(0 */12 * * ? *) |
| GitHub Actions | - cron: '0 */12 * * *' (UTC) |
| Kubernetes | schedule: "0 */12 * * *" |
Questions
What is the cron expression for every 12 hours?
0 */12 * * *. Every 12 hours, on the hour.
How do I write it in Quartz or Spring?
Add a seconds field and use "?" for the unused day field: 0 0 */12 * * ?. In Spring: @Scheduled(cron = "0 0 */12 * * ?").
What is the AWS EventBridge version?
cron(0 */12 * * ? *). AWS uses six fields with a year at the end and needs "?" in one of the day fields.
Which time zone will it use?
The time zone of the machine or service running cron. GitHub Actions and Vercel use UTC; Kubernetes uses spec.timeZone if set. The preview above lets you pick a zone.