- Home
- Tools
- Developer Tools
- Cron Expression Explainer
- Cron Expression for Every 10 Minutes
Cron Expression for Every 10 Minutes
*/10 * * * * runs a job every ten minutes, at :00, :10, :20 and so on. It works because 10 divides an hour evenly, which not every step does.
Every 10 minutes
| Field | Value | Matches |
|---|---|---|
| Minute | */10 | 0, 10, 20, 30, 40 and 50 |
| Hour | * | every hour |
| Day of month | * | every day of the month |
| Month | * | every month |
| Day of week | * | every day of the week |
Next 10 runs
Cron goes by the clock of the machine it runs on. These are the runs on a machine in your time zone.
Six runs an hour
In */10 * * * * the */10 in the minute field stands for minutes 0, 10, 20, 30, 40 and 50, which makes 144 runs a day. It is shorthand for the list 0,10,20,30,40,50, the way it had to be written before cron understood steps. Both give the same schedule, as the first row of the table shows.
| Expression | Runs |
|---|---|
| */10 * * * * | Every 10 minutes |
| 0,10,20,30,40,50 * * * * | Every 10 minutes |
| 5-55/10 * * * * | At minutes 5, 15, 25, 35, 45 and 55 of every hour |
| */10 8-18 * * * | Every 10 minutes from 08:00 to 18:50 |
| */45 * * * * | At minutes 0 and 45 of every hour |
Why 10 works and 45 doesn't
A step always starts counting again at minute 0 of the next hour. With 10 you never see that, because 10 divides 60 and the last gap is as long as the others. With a step that doesn't divide 60 it shows: */45 runs at minute 0 and at minute 45, and then at minute 0 again, a quarter of an hour later. The steps that give an even rhythm in the minute field are 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30.
Ten minutes, but not on the round ones
To keep the interval and move away from :00, start the range later: 5-55/10 runs at 5, 15, 25 and so on. A plain 5/10 is not valid in a crontab, the step needs a range or a star in front of it.
The cron expression explainer has the full syntax: the five fields, lists, ranges and steps, and how day of month and day of week work together.