Cron Twice a Day
Set up a cron job that runs twice a day at midnight and noon using 0 0,12 * * *. Complete field breakdown and practical scheduling examples.
Cron Expression
0 0,12 * * *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | 0,12 | At 0, 12 |
| Day of Month | * | Every day of the month (1–31) |
| Month | * | Every month (1–12) |
| Day of Week | * | Every day of the week (Sun–Sat) |
Detailed Explanation
The cron expression 0 0,12 * * * schedules a task to run twice per day, at midnight and at noon.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the start of the hour.0,12(Hour): At hours 0 (midnight) and 12 (noon). The comma creates a list of specific hours.*(Day of Month): Every day from 1 through 31. No restriction on the day of the month.*(Month): Every month from January through December. No restriction on the month.*(Day of Week): Every day of the week from Sunday through Saturday. No restriction on the day.
This means your task will execute exactly 2 times per day, with 12 hours between each run. This schedule provides balanced coverage across the day with one run during off-hours and one during business hours. It is functionally equivalent to 0 */12 * * * and is one of the most common schedules for tasks that need to run more than once daily but where higher frequencies are unnecessary. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Great for synchronizing user account data between a primary application database and a third-party CRM system twice daily.
Try It — Interactive Builder
2 times a day: 12:00 AM, 12:00 PM
Next 10 Executions
Ctrl+Shift+C to copy expression