Skip to main content

Cron every 5 minutes with a 2-minute offset

Question

How do I set a cron script for every 5 minutes without using the minutes divisible by 5?

Answer

Use 2-59/5 * * * * to run at minutes 2, 7, 12, 17, and every five minutes after that through minute 57 of each hour. This keeps a five-minute cadence without using the minutes divisible by five. After the :57 run, the next hour's :02 run is five minutes later, so the spacing stays consistent across the hour boundary.

crontab
# every 5 minutes, offset 2 minutes from the usual cadence
2-59/5 * * * *

Read the five fields as minute, hour, day of month, month, and day of week. In the minute field, 2-59/5 means begin at minute 2, remain within the range ending at minute 59, and advance in steps of 5. That expands to 2, 7, 12, 17, and so on through 57; the next value, 62, is outside the valid range and is omitted. The wildcard hour repeats this pattern every hour, and the remaining wildcards match every day of the month, every month, and every day of the week. More generally, m-59/n * * * * runs every n minutes starting at minute m, but the spacing only stays even across the hour boundary when n divides 60 (2, 3, 4, 5, 6, 10, 12, 15, 20, or 30).

Run 2-59/5 * * * * on Crontap
Why this matters

An offset can prevent many jobs from firing together at :00, :05, :10, and the other common five-minute marks. Moving this task to :02, :07, :12, and so on spreads demand away from that shared cadence. Not every start value and step preserve equal spacing across an hour boundary, though: compare the final run in one hour with the first run in the next. For this expression, :57 to :02 is exactly five minutes, so no short or long gap appears. For the unshifted cadence, see cron every 5 minutes.

Read the dedicated guide: Cron every 5 minutes.

Cron schedule used

What it does

2-59/5 * * * *

Every 5 minutes, minutes 2 through 59 past the hour, every hour, every day.

Calendar

View future cron matches in a calendar

September 2026 · UTC

0 runs

See this cron expression on the calendar view example

Write the cron here. Run it on Crontap.

Point Crontap at any URL. Pick any cron. Done.

WordPress, Shopify, Railway, Cloud Run, Vercel, HubSpot, Ghost, your own box. If it answers HTTP, Crontap can drive it on a clock you can read, in the timezone that actually matters, and page you when something breaks.

1.9k+ teams · Free forever tier · No credit card

Permalink: https://tool.crontap.com/help/cron-job-expression-how-to-run-a-script-every-nth-minutes