Cheat Sheets · Cron Cheat Sheet · Cron Every 2 Minutes — Crontab Example
Cron Every 2 Minutes — Crontab Example
*/2 * * * *
Runs every 2 minutes — at minutes 0, 2, 4, 6, … 58 of every hour.
Field by field
| Field | Value | Meaning |
|---|---|---|
Minute | */2 | Every 2nd minute (0, 2, 4, … 58) |
Hour | * | Every hour |
Day of month | * | Every day |
Month | * | Every month |
Day of week | * | Every day of the week |
Frequent 2-minute polling is suitable for payment webhooks, queue dispatching, or critical server telemetry checks. It runs 720 times per day.
*/2 * * * * flock -n /tmp/poll.lock /usr/local/bin/queue-worker.sh
Related schedules
FAQ
Can I run on odd minutes (1, 3, 5…)?
Yes — specify a range: 1-59/2 * * * *.
Is flock mandatory?
Highly recommended. If any task takes longer than 120 seconds, flock ensures the next invocation exits immediately rather than accumulating duplicate processes.
How many times does this run daily?
Exactly 720 times (30 runs per hour × 24 hours).
Stop memorizing — build it interactively
Try this schedule in the Cron EditorFull reference: Cron Cheat Sheet