Cheat Sheets · Cron Cheat Sheet · Cron Midnight and Noon — Crontab Example

Cron Midnight and Noon — Crontab Example

0 0,12 * * *

Runs twice daily — at 00:00 (midnight) and 12:00 (noon).

Field by field

FieldValueMeaning
Minute0At minute 0
Hour0,12At 00:00 and 12:00
Day of month*Every day
Month*Every month
Day of week*Every day of the week

The expression 0 0,12 * * * clearly states both target hours in a list. It is identical in execution to 0 */12 * * * but many engineers prefer the explicit hour listing for readability.

0 0,12 * * * /usr/local/bin/half-day-rollup.sh

Related schedules

FAQ

Why use 0,12 instead of */12?
Both work identically. Writing 0,12 makes the exact hours immediately obvious without mental step calculation.

Can I add a third time, like 6 PM?
Yes: simply write 0 0,12,18 * * *.

Can I offset the minutes?
Yes: 15 0,12 * * * fires at 00:15 and 12:15.

Stop memorizing — build it interactively

Try this schedule in the Cron Editor

Full reference: Cron Cheat Sheet