Cron Every 8 Hours
Configure a cron job to run every 8 hours using 0 */8 * * *. Full field-by-field breakdown with use cases and scheduling recommendations.
Cron Expression
0 */8 * * *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | */8 | Every 8th hour |
| 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 */8 * * * schedules a task to run once every eight hours, at the top of every eighth hour.
Field-by-field breakdown:
0(Minute): At minute 0 only. The task fires at the start of the hour.*/8(Hour): Every 8th hour, starting from hour 0. The step value/8triggers execution at hours 0, 8, and 16.*(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 3 times per day, at midnight, 8 AM, and 4 PM. The eight-hour interval aligns naturally with three work shifts and is commonly used for shift-based reporting or handoff tasks. Each execution has a substantial eight-hour window, making this schedule appropriate for long-running jobs such as full data exports, comprehensive security scans, or large file transfers. 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
Perfect for generating shift-based summary reports in a manufacturing environment where three 8-hour shifts operate continuously.
Try It — Interactive Builder
Every 8 hours
Next 10 Executions
Ctrl+Shift+C to copy expression