The cron expression for every 5 hours is 0 */5 * * *. Here is what each field means, when the job runs next, and how to know if it stops running.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 |
| Hour | */5 | Every 5 hours: 0, 5, 10, 15 and 20 |
| Day of month | * | Every day of the month |
| Month | * | Every month |
| Day of week | * | Every day of the week |
24 doesn't divide by 5: */5 means hours 0, 5, 10, 15 and 20, so the run at 20:00 is followed by the one at midnight, 4 hours later. Cron can't express a true 5-hour interval; if the gap matters, schedule the job every hour and let it decide whether to run.
Cron doesn't tell you when a job is skipped, crashes or hangs. Create a Hyperping healthcheck in cron mode with 0 */5 * * * and the job's timezone, add one curl to the end of the job, and you're alerted when a run is missed. Free for up to 20 jobs.
Popular cron schedules:
Every minute • Every 5 minutes • Every 10 minutes • Every 15 minutes • Every 30 minutes • Every hour • Every 2 hours • Every 3 hours • Every 4 hours • Every 6 hours • Every 8 hours • Every 12 hours • Every 24 hours
Every day • Every 2 days • Every 7 days • Every week • Every weekday • Every weekend • At midnight • At noon
Start of month • Twice a month • Every quarter • Every 6 months • Every year • Every leap year
During office hours • Overnight • Every spring • Every fall • Every winter • On Christmas • On New Year
Every 2 minutes • Every 3 minutes • Every 5 hours • Every 16 hours
Related: Cron job monitoring, get alerted when a job misses its schedule