Cron Expression: Cron Twice a Day

Learn how to create a cron expression for 'cron twice a day'. Runs at midnight and noon, 12 hours apart, with our free cron generator tool.

Cron Expression

0 0,12 * * *

Want to tweak this schedule?

Edit this expression in our interactive generator and see it broken down in real time.

Open in Cron Generator

Expression Breakdown

0
Minute
(0-59)
0,12
Hour
(0-23)
*
Day
(1-31)
*
Month
(1-12)
*
Weekday
(0-6)
Field Value Meaning
Minute 0 At minute 0
Hour 0,12 At hours 0,12
Day of Month * Any day
Month * Any month
Day of Week * Any day of the week

This cron expression represents: cron twice a day

Cron Expression

0 0,12 * * *

What This Expression Does

Runs twice per day — at midnight (00:00) and noon (12:00) — exactly 12 hours apart. The comma in the hour field is a value list: “at hour 0 and at hour 12.”

Use Cases

Twice-daily is a sweet spot when hourly is wasteful but daily is too stale:

How to Use

  1. Copy the cron expression above
  2. Open your crontab with crontab -e
  3. Add a new line with: 0 0,12 * * * /path/to/your/script.sh
  4. Save and exit

Picking Your Own Two Times

The list syntax takes any pair of hours: 0 6,18 * * * runs at 6am and 6pm; 30 9,21 * * * runs at 9:30am and 9:30pm. The two runs don’t need to be 12 hours apart — 0 8,17 * * * (start and end of the workday) is perfectly valid.

Alternative Formats