Run a Cron Job Every 12 Hours (Twice a Day)
0 */12 * * * runs twice a day, at 00:00 and 12:00. Midnight-and-noon is the default twice-daily rhythm; if you'd rather run at, say, 06:00 and 18:00, list the hours explicitly instead of using a step.
0 */12 * * *In plain English: At minute 0, every 12 hours.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | */12 | every 12 hours |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
0 6,18 * * *twice daily at 06:00 and 18:0030 8,20 * * *twice daily at 08:30 and 20:300 0 * * *reduce to once a day at midnightTweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
How do I run twice a day at custom times?
Use a comma list in the hour field: 0 6,18 * * * runs at 06:00 and 18:00. Steps always anchor at the range start, so lists are clearer for specific times.
Does */12 ever run at 12:00 only?
No — the step from hour 0 matches both 0 and 12. If you want noon only, write 0 12 * * *.
Related schedules
New to cron syntax? Read Cron Expressions Explained, Field by Field.