The expression
* * * * *
Runs once at the start of every minute, around the clock: 60 times an hour, 1,440 times a day. Cron wakes up once a minute, checks every entry, and starts the ones that match, so this is the most frequent schedule standard cron can express.
| Field | Value | Meaning |
|---|---|---|
| Minute | * |
every minute, 0-59 |
| Hour | * |
every hour, 0-23 |
| Day of month | * |
every day |
| Month | * |
every month |
| Day of week | * |
every day of the week |
A * means "any value". With all five fields set to *, nothing narrows the schedule, so the job starts whenever the minute changes (12:00:00, 12:01:00 …), usually within a second of the boundary.
Variants
| Schedule | Expression |
|---|---|
| Every minute from 9:00 to 16:59 | * 9-16 * * * |
| Every minute, weekdays only | * * * * 1-5 |
| Every minute during the 2 a.m. hour only | * 2 * * * |
| Every 2 minutes | */2 * * * * |
| Every 5 minutes | */5 * * * * |
| Every 30 seconds (needs a workaround) | two entries with sleep 30 |
*/1 * * * * is the same as * * * * *; the step adds nothing.
Where to write it
- crontab (Linux, macOS):
* * * * * /usr/local/bin/poll.shincrontab -e. Times follow the server's time zone, which only matters once you restrict the hour or day fields. - GitHub Actions: the shortest interval GitHub runs is 5 minutes, so
* * * * *will not fire every minute there. Schedules are in UTC and can be delayed when runners are busy. Use an external scheduler or a long-running worker instead. - Kubernetes CronJob:
schedule: "* * * * *"works, but each run starts a new pod. SetconcurrencyPolicy: Forbidand keepsuccessfulJobsHistoryLimitlow so finished Jobs don't pile up. - AWS EventBridge: six fields with
?in one day field:cron(* * * * ? *), or simplyrate(1 minute), the smallest rate allowed.
Common mistakes
* 9 * * *is not "9 a.m. once". A*in the minute field makes it run 60 times, from 9:00 to 9:59. For once at 9:00 write0 9 * * *.- Overlapping runs. A job that sometimes takes longer than a minute will run in parallel with itself. Wrap it in
flock -n /tmp/poll.lock commandso a new run exits while the old one is still going. - Log and mail floods. Any output is mailed to the crontab owner, 1,440 times a day. Redirect it:
command >> /var/log/poll.log 2>&1, and rotate that log. - Using cron as a queue. If you need something within seconds of an event, a long-running worker or a message queue reacts faster and costs less than polling every minute.
Paste any expression into the Cron Expression Parser to see it in words and its next run times.