Run cron jobs every 5, 10, 15 or 30 minutes
Use minute-field steps for clock-aligned schedules, with clear limits for longer intervals and overlapping runs.
Use */N in the minute field on cron implementations supporting step syntax. For example:
*/5 * * * * /opt/jobs/task.sh
This matches minutes 0, 5, 10 and so on through 55 of each hour. It is aligned to the clock, not measured from when the previous run started or finished.
Common intervals
| Desired schedule | User-crontab entry |
|---|---|
| Every five minutes | */5 * * * * /opt/jobs/task.sh |
| Every ten minutes | */10 * * * * /opt/jobs/task.sh |
| Every fifteen minutes | */15 * * * * /opt/jobs/task.sh |
| Every thirty minutes | */30 * * * * /opt/jobs/task.sh |
| At the start of every hour | 0 * * * * /opt/jobs/task.sh |
* * * * * means every minute, not every hour. A single 5 in the minute field matches only minute five of each hour.
Understand the field boundaries
The five fields are minute, hour, day of month, month and day of week. A step selects values inside one field's range. For the minute field, */10 is equivalent to 0,10,20,30,40,50.
Steps do not carry an elapsed interval across field boundaries. */7 matches minute 56 and then minute 0 of the next hour, leaving a four-minute gap at that boundary. Likewise, 0 0 */3 * * selects day numbers starting at day one within each month; it does not guarantee one run every 72 hours.
For an interval measured from completion, use a suitable application scheduler or timer instead.
Restrict or offset the schedule
# Every ten minutes during hours 09 through 18 on weekdays
*/10 9-18 * * 1-5 /opt/jobs/task.sh
# Minutes 7, 17, 27, 37, 47 and 57 of every hour
7-59/10 * * * * /opt/jobs/task.sh
The first example includes 18:50. If the intended cutoff is 18:00, use hours 9-17 and add a separate 18:00 entry if needed. Field ranges are inclusive.
Handle overlap and observe completion
Cron normally starts the next scheduled invocation even if the previous one has not finished. On Linux, a stable flock path in a directory controlled by the job account can make overlapping runs skip or wait. Define that policy deliberately; skipping is inappropriate when every scheduled unit must eventually execute.
Log a job identifier, scheduled period, completion time and result. If these logs are collected in Guance, log detection can check for expected completion records. For a five-minute task that normally finishes within one minute, a ten-minute lookback may be a starting point, subject to actual collection latency and detection frequency. A thirty-minute task needs a different window.
Configure missing-data behavior explicitly. Window counts can reveal missing completions in aggregate but cannot prove that each individual scheduled run happened. Match expected run identifiers when that distinction matters.
Common questions
Can I use steps in the hour field? Common implementations support them: 0 */2 * * * selects even-numbered hours. Check the cron dialect rather than assuming every scheduler accepts identical syntax.
Does cron wait for a slow job? No. Use locking, a queue, or a scheduler with the required overlap behavior.
Does */5 start five minutes after I save the table? No. It starts at the next matching clock minute after cron loads the table.
References
Contact us
Join the community
to join the community
Try Guance
Start online and pay only for what you use.
Get startedChoose a Guance plan