Cron Every 12 Hours
Every 12 hours is 0 */12 * * *, which runs at midnight and noon. To pick other times, list the two hours instead.
minute · hour · day · month · weekday
Build it with controlsEvery 12 h at :00
In plain English
At midnight and noon every day.
Tap a field to see what it means.
- Next run
- —
- Usually every
- —
- Time zone
- Yours
Convert to another schedulerQuartz, Spring, AWS, GitHub Actions, Kubernetes
| Standard cron | 0 */12 * * * | current |
|---|---|---|
| Quartz | 0 0 0/12 * * ? | |
| Spring | 0 0 */12 * * * | |
| AWS EventBridge | cron(0 0/12 * * ? *) | |
| GitHub Actions | 0 */12 * * * | |
| Kubernetes | 0 */12 * * * |
About Standard cronTime zone, day numbering, daylight saving
- Runs in the machine’s local time zone; cronie also reads CRON_TZ at the top of the crontab.
- Five fields, then the command. Day of week is 0–7 (0 and 7 are Sunday) or SUN–SAT; months 1–12 or JAN–DEC.
- When both day fields are set, a day that matches either one runs.
- Daylight saving: a job at a fixed time in a skipped hour runs right after the change, and one in a repeated hour runs once. Jobs with * in the minute or hour follow the clock.
Sources: crontab(5), cronie, cron(8), cronie, POSIX crontab.
How this works: Method, 10 sources,
How this works
Method
The expression is read field by field with the rules of the scheduler you pick (ranges, lists, steps, names, @ macros, and L, W and # where it has them) into the values each field allows. The next runs come from stepping forward through the calendar in the chosen time zone, day by day and then time by time, using that scheduler’s rule for when both day fields are set and its documented rule for daylight saving (where it has none, a skipped time is skipped and a repeated one runs once). A conversion to another scheduler is parsed back and checked against the original before it is shown.
Sources
Changes
- First version: plain English and the next runs for six schedulers, a builder, conversion between them, and 20 pages for common schedules.
Worked example: 0 */12 * * *
Say the clock reads Monday 4 January 2027, 3:00 PM UTC. 0 */12 * * * means “at midnight and noon every day”, so the next five runs are Tuesday 5 January 2027, 12:00 AM, 12:00 PM, Wednesday 6 January 2027, 12:00 AM, 12:00 PM and Thursday 7 January 2027, 12:00 AM.
In UTC, where no clock change interrupts it, that comes to 2 runs a day, 14 a week and 730 in 2027.
Twice a day
0 */12 * * * picks hours 0 and 12, so the job runs at midnight and at noon. For any other pair twelve hours apart, list them: 0 9,21 * * * runs at 9:00 AM and 9:00 PM.
The two runs needn’t be twelve hours apart at all. 30 7,18 * * * runs at 7:30 AM and 6:30 PM; any minute and any list of hours work, as long as the job should run at the same minute each time.
For two different minutes, such as 8:00 and 20:30, use two crontab lines, because one line can only combine every listed hour with every listed minute. 0,30 8,20 * * * would give four runs.
Pitfalls
- Combining lists multiplies them: 0,30 8,20 * * * runs at 8:00, 8:30, 20:00 and 20:30.
- Noon and midnight are 12 and 0. There is no hour 24; 0 24 * * * is an error.
- On a UTC server, “noon” is noon UTC; check the next runs in your own zone here.
- The hour field takes 0–23 and the minute field 0–59; a field may be * for “first-last”. Source: crontab(5), cronie.
- AWS EventBridge cron expressions have six fields, minutes first and the year last, so twice a day there is cron(0 0,12 * * ? *). Source: Amazon EventBridge Scheduler: schedule types.
“Every 12 Hours” in every scheduler
The same schedule written for each scheduler, converted and checked by this tool. A dash means that scheduler can’t express it in one expression; the note says why.
| Scheduler | Expression | Note |
|---|---|---|
| Standard Unix cron (Vixie cron, cronie) | 0 */12 * * * | |
| Quartz Scheduler (Java) | 0 0 0/12 * * ? | |
| Spring Framework @Scheduled | 0 0 */12 * * * | |
| Amazon EventBridge cron() | cron(0 0/12 * * ? *) | |
| GitHub Actions schedule | 0 */12 * * * | |
| Kubernetes CronJob | 0 */12 * * * |
Frequently Asked Questions
What is the cron for twice a day?
0 */12 * * * runs at midnight and noon. To choose the times, list two hours: 0 9,21 * * * runs at 9 AM and 9 PM.
How do I run at 8:00 and 20:30?
Two lines: 0 8 * * * and 30 20 * * *. A single line pairs every listed hour with every listed minute, which would give four runs.
Is @twicedaily a cron macro?
No. Linux cron, Kubernetes and Spring know @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly (plus @reboot in Linux cron). Write 0 */12 * * * instead.