The expression
*/2 * * * *
Runs at minute 0, 2, 4, 6 … 58 of every hour, every day: 30 times an hour, 720 times a day. Because 60 divides evenly by 2, the gap is always exactly 2 minutes, including across the hour (12:58, then 13:00).
| Field | Value | Meaning |
|---|---|---|
| Minute | */2 |
every 2nd minute, starting at 0 |
| Hour | * |
every hour |
| Day of month | * |
every day |
| Month | * |
every month |
| Day of week | * |
every day of the week |
*/2 is a step over the field's whole range (0-59), so it always lands on even minutes. It does not count from when you saved the crontab.
Variants
| Schedule | Expression |
|---|---|
| Every 2 minutes on odd minutes (12:01, 12:03…) | 1-59/2 * * * * |
| Every 2 minutes, weekdays only | */2 * * * 1-5 |
| Every 2 minutes from 9:00 to 17:58 | */2 9-17 * * * |
| Every 3 minutes | */3 * * * * |
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every 10 minutes | */10 * * * * |
Two jobs that shouldn't run at the same time can split the minutes: one on */2, the other on 1-59/2.
Where to write it
- crontab (Linux, macOS):
*/2 * * * * /usr/local/bin/sync.shincrontab -e. Times follow the server's time zone. - GitHub Actions: not possible. The shortest interval GitHub runs is 5 minutes, and scheduled workflows run in UTC and may start late under load. Use
*/5 * * * *or trigger the workflow from outside withworkflow_dispatch. - Kubernetes CronJob:
schedule: "*/2 * * * *", withtimeZone:if you restrict hours. SetconcurrencyPolicy: Forbidso a slow run doesn't overlap the next. - AWS EventBridge: six fields,
?in one day field:cron(0/2 * * * ? *). Orrate(2 minutes), which counts from when the rule was created rather than from the clock.
Common mistakes
0 */2 * * *is every 2 hours, not every 2 minutes. The step belongs in the first field. See every 2 hours.2 * * * *runs once an hour, at minute 2.* */2 * * *runs every minute during even hours: 60 runs at 0:00-0:59, none at 1:00-1:59, and so on.- Overlap. If a run can exceed 2 minutes, use
flock -n /tmp/sync.lock commandso the next one skips instead of piling up.
Paste any expression into the Cron Expression Parser to see it in words and its next run times.