Cheat Sheets · Cron Cheat Sheet · Cron Every 12 Hours — Crontab Example

Cron Every 12 Hours — Crontab Example

0 */12 * * *

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

Field by field

FieldValueMeaning
Minute0At minute 0
Hour*/12Hours 0 and 12
Day of month*Every day
Month*Every month
Day of week*Every day of the week

Twice-daily schedules divide day and night cleanly. The expressions 0 */12 * * * and 0 0,12 * * * are completely equivalent.

If you prefer to align with business hours (such as 9 AM and 6 PM), use an explicit list: 0 9,18 * * *.

0 */12 * * * /usr/local/bin/sync-external.sh

Related schedules

FAQ

Is 0 */12 * * * identical to 0 0,12 * * *?
Yes, both fire at 00:00 and 12:00.

How to run at 6 AM and 6 PM instead?
Write 0 6,18 * * *.

Does it run on weekends?
Yes, the day-of-week field is wildcarded (*). To run only on weekdays, change the last field to 1-5.

Stop memorizing — build it interactively

Try this schedule in the Cron Editor

Full reference: Cron Cheat Sheet