Cron Every 12 Hours
The */12 in the hour field means "every 12th hour." This runs at 12:00 AM and 12:00 PM — twice per day.
Cron Expression
0 */12 * * *Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 |
| Hour | */12 | Every 12th hour (0, 12) |
| Day of Month | * | Every day (1-31) |
| Month | * | Every month (1-12) |
| Day of Week | * | Every day of the week (0-6) |
Variations
0 */12 * * *Every 12 hours (12 AM and 12 PM)0 0,12 * * *Equivalent explicit form0 6,18 * * *Twice daily at 6 AM and 6 PM0 9,21 * * *Twice daily at 9 AM and 9 PMCommon Use Cases
- Twice-daily database backups
- Morning and evening report generation
- Semi-daily security scans
- Large data export/import operations
Tips & Best Practices
*/12 runs at midnight and noon. Use explicit hours like 0 6,18 * * * if you want different times.
Good for jobs too heavy to run hourly but that need more than a daily run.