I have multiple cron jobs that I want to run every 5 minutes, some of which are memory intensive. As such, I don't want to run them all at the same time. Crontab lets me run a job that looks like

*/5 * * * * * <job>

which runs on the 0th, 5th, 10th, 15th, etc minutes. I'm looking for a way to run a cron job on the 2nd, 7th, 12th, 17th, etc minutes. Is there a way to do that without typing out every minute in that set?

1 Answer 1


Answer to my own question

The answer to my question specifically is

2-59/5 * * * * <job>

In general, to run a job every nth minute starting at m (with 1≤m<n), it's

m-59/n * * * * <job>

The dash means "every minute starting at m and ending at 59, inclusive on both ends."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .