Cron every 15 minutes: */15 * * * *
*/15 * * * * runs on the quarter hours, four times an hour and 96 times a day, at minutes 0, 15, 30 and 45.
At a glance
- Expression
- */15 * * * *
- Fires
- 96 times a day, 4 times an hour, 672 times a week.
- Restricted fields
- Minute only. Hour, day of month, month and day of week are open.
- Equivalent macro
- None.
- Minutes matched
- 0, 15, 30, 45.
- Runs on a daylight saving day
- 92 on the day an hour is skipped, 100 on the day an hour repeats, in zones that observe it.
In detail
The quarter hour is the most human of the machine schedules, which is why so much reporting is built on it. Four runs an hour, ninety six a day, and every run lands on a minute a person would think to write down. It is also the coarsest interval most teams will accept for a dashboard that claims to be near live.
Because the schedule is defined in minutes and not in absolute time, a daylight saving change moves the count rather than the alignment. In a zone where the clock jumps forward an hour, four runs simply never happen and the day has 92. In the autumn, when the same wall clock hour is lived through twice, the day has 100. A job that writes one row per run and expects exactly 96 will notice.
This is a good schedule to offset, because the quarter hours are where scheduled work concentrates on almost every system. Using 7-59/15 gives runs at 7, 22, 37 and 52 past, which is still four an hour, still evenly spaced, and lands on minutes that essentially nothing else uses.
Fifteen minutes is also long enough that a run is worth logging individually. At 96 lines a day a plain append only log stays readable for months, and a missing line is easy to spot by eye, which is not true at one minute intervals. Log the start time, the window the run covered, and the row count, and most debugging becomes reading the file.
Examples
*/15 * * * *7-59/15 * * * *Fires at 7, 22, 37 and 52 past every hour.
*/15 * * * 1-5 /opt/app/bin/report.sh >> /var/log/report.log 2>&1480 runs a week instead of 672.
Things that catch people out
- 0,15,30,45 and */15 produce exactly the same set of minutes. Neither is more correct, but mixing both styles in one crontab makes review harder.
- A quarter hourly job that aggregates the previous quarter hour must derive that window from the clock, not from the previous run, or a single missed run silently drops fifteen minutes of data forever.
- Putting */15 in the hour field gives 0 and 15 only, because the hour field stops at 23. It is not an error, so it fails quietly.
Try it: Cron Expression Parser
Paste any five or six field expression to get a plain English description, a per field breakdown and the next run times in your local time.
Cron Expression Parser
LOCAL · Browser-OnlyParse cron expressions and see the next scheduled run times
Supports 5-field (minute hour day month weekday), 6-field (with seconds), named values (JAN, MON), and @macros (@daily, @hourly, ...)
Use the dropdowns below to build your cron expression visually, or type a custom value in each field.
Human-Readable Description
Every 5 minutes
Field Breakdown
| Field | Allowed | Value | Meaning |
|---|---|---|---|
| Minute | 0-59 | */5 | every 5 minute(s) |
| Hour | 0-23 | * | every hour |
| Day of Month | 1-31 | * | every day of month |
| Month | 1-12 | * | every month |
| Day of Week | 0-7 | * | every day of week |
Related cron expressions
All cron expressions →Cron every 30 minutes: */30 * * * *
*/30 * * * * fires 48 times a day at minutes 0 and 30. The half hour is the busiest slot on most servers, and 15,45 costs nothing to move to.
Cron every 5 minutes: */5 * * * *
*/5 * * * * fires 288 times a day at minutes 0, 5, 10 and so on. Why every job on the box lands on the same minute and how 2-59/5 fixes it.
Cron every 15 minutes on weekdays: */15 * * * 1-5
*/15 * * * 1-5 fires 96 times a weekday and 480 times a week. Combining a minute step with a weekday range, and how to add an hour window too.
Cron step values: what */n really does
*/n walks a field from its minimum in increments of n. Because it starts at the field minimum, */2 gives even minutes and odd days of the month.
Cron every 20 minutes: */20 * * * *
*/20 * * * * fires 72 times a day at minutes 0, 20 and 40. Why three runs an hour is the practical floor for jobs with a long startup cost.
Cron every 45 minutes: why */45 * * * * does not do it
*/45 * * * * fires at minute 0 and minute 45 only, so the gaps alternate 45 and 15 minutes. Here is the four line crontab that really runs every 45 minutes.
Tools for this
- Cron Expression Parser Free online cron expression parser - parse cron expressions and see the next scheduled run times
- Crontab Generator Free online crontab generator - build cron expressions visually with an intuitive interface