Cron every minute: * * * * *
* * * * * runs a job at the start of every minute, 1,440 times a day. It is the highest frequency a standard five field crontab can express.
At a glance
- Expression
- * * * * *
- Fires
- 1,440 times a day, 60 times an hour, at second 0 of every minute.
- Restricted fields
- Nothing is restricted. All five fields are *, so every minute of every hour of every day matches.
- Equivalent macro
- None. There is no @minutely in the supported macro set.
- Interval between starts
- 60 seconds, measured start to start, not end to start.
- Faster than this
- Only with a seconds field, which crontab itself does not accept.
In detail
This is the only expression in common use where no field constrains anything. Each of the five positions is a bare asterisk, so the minute matches all 60 values, the hour all 24, the day of month all 31, the month all 12 and the day of week all 7. There is no combination of date and time that fails the test, which is why the count is simply the number of minutes in a day.
The thing that bites at this frequency is overlap. Cron fires on the clock and never checks whether the last copy of the job has finished. A task that normally takes twenty seconds but occasionally takes three minutes will quietly end up with three copies running at once, and if the slow path is caused by load, the extra copies make it slower still. A lock file around the command is not optional here.
Output is the second problem. Cron mails anything a job writes to stdout or stderr to the crontab owner, so a chatty script at this rate produces 1,440 mails a day and, on a box with no mail transport configured, 1,440 log lines complaining that it could not send them. Redirect both streams to a file you rotate, or set an empty MAILTO at the top of the crontab.
Before committing to every minute, check whether the work is actually periodic. Polling a queue once a minute means the average item waits thirty seconds, which is usually worse and more expensive than a long lived worker that blocks on the queue. Cron at this frequency makes sense for cheap idempotent checks, not for anything you would describe as real time.
Examples
* * * * ** * * * * /usr/bin/flock -n /tmp/poll.lock /opt/app/bin/poll.sh >> /var/log/poll.log 2>&1flock -n exits immediately if the previous run still holds the lock, so a slow run is skipped rather than stacked.
* 9-17 * * 1-5 /opt/app/bin/poll.sh540 runs a week instead of 10,080.
Things that catch people out
- A stray sixth token changes the meaning completely. Six fields are read as a leading seconds field, so * * * * * * is every second, not every minute.
- Cron does not queue. If the machine is asleep or the daemon is stopped for ten minutes, those ten runs are lost, not replayed on wake.
- MAILTO must appear before the job lines it applies to. Putting MAILTO="" at the bottom of the crontab has no effect on the lines above it.
Try it: Cron Expression Parser
Paste any five or six field expression to get a plain English description, a per field breakdown and the next run times in your local time.
Cron Expression Parser
LOCAL · Browser-OnlyParse cron expressions and see the next scheduled run times
Supports 5-field (minute hour day month weekday), 6-field (with seconds), named values (JAN, MON), and @macros (@daily, @hourly, ...)
Use the dropdowns below to build your cron expression visually, or type a custom value in each field.
Human-Readable Description
Every 5 minutes
Field Breakdown
| Field | Allowed | Value | Meaning |
|---|---|---|---|
| Minute | 0-59 | */5 | every 5 minute(s) |
| Hour | 0-23 | * | every hour |
| Day of Month | 1-31 | * | every day of month |
| Month | 1-12 | * | every month |
| Day of Week | 0-7 | * | every day of week |
Related cron expressions
All cron expressions →Cron every 2 minutes: */2 * * * *
*/2 * * * * fires 720 times a day on even minutes only. How to run on odd minutes instead with 1-59/2, and what the even alignment costs you.
Cron every 5 minutes: */5 * * * *
*/5 * * * * fires 288 times a day at minutes 0, 5, 10 and so on. Why every job on the box lands on the same minute and how 2-59/5 fixes it.
Cron every second: * * * * * * with a seconds field
Six asterisks means every second, 86,400 times a day. Standard crontab has no seconds field, so this form only works in schedulers that accept six.
The cron asterisk: what * means in each field
An asterisk matches every value in a field's own range, which differs per field. Why * */1 * * * is every minute and not every hour.
Cron every 3 minutes: */3 * * * *
*/3 * * * * fires 480 times a day at minutes 0, 3, 6 and so on to 57. Why 3 divides the hour cleanly and what that means for scheduling.
Cron every 10 minutes: */10 * * * *
*/10 * * * * fires 144 times a day at minutes 0, 10, 20, 30, 40 and 50. Run counts, offset variants and the rate limit maths that make it popular.
Tools for this
- Cron Expression Parser Free online cron expression parser - parse cron expressions and see the next scheduled run times
- Crontab Generator Free online crontab generator - build cron expressions visually with an intuitive interface