Cron Every 8 Hours
The 0 in the minute field pins the job to the top of the hour, and */8 in the hour field means "every 8th hour." The job runs at 00:00, 08:00, and 16:00 — three times per day.
Cron Expression
0 */8 * * *Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 (top of the hour) |
| Hour | */8 | Every 8th hour (0, 8, 16) |
| Day of Month | * | Every day (1-31) |
| Month | * | Every month (1-12) |
| Day of Week | * | Every day of the week (0-6) |
Variations
0 */8 * * *Every 8 hours (00:00, 08:00, 16:00)0 0,8,16 * * *Every 8 hours (explicit form, identical result)0 */8 * * 1-5Every 8 hours on weekdays onlyCommon Use Cases
- Three-times-daily syncs aligned to work shifts
- Rotating logs or rebuilding indexes
- Periodic cleanup and maintenance tasks
Tips & Best Practices
Since 8 divides evenly into 24, the three daily runs stay aligned every day.
0 0,8,16 * * * is an equivalent explicit form if you prefer listing the hours.
For shift-aligned jobs, confirm the hours match your server timezone with the timezone-converter.