NV ToolkitFormat · Validate · Convert

Cron example

Cron Every Minute

* * * * *

Every minute, every hour, every day

Open in the cron expression generator

Five asterisks is the busiest schedule classic cron can express: every minute of every hour, of every day, of every month, forever. It is the schedule people reach for while debugging a crontab, and the one that quietly becomes permanent. Here is exactly what it does, and where it starts to hurt.

By NaveenKumar T · Updated · 5-field crontab expression

What each field means

Minute, hour, day of month, month, day of week — read left to right.
FieldValueMeaning
Minute*Every minute
Hour*Every hour
Day of month*Every day
Month*Every month
Day of week*Every day of the week

Next 5 run times

Computing the next runs in your timezone…

When once a minute is the right answer

A minute is cron's smallest native tick, so this expression is the floor for anything that has to feel near-real-time: draining a work queue, polling an inbox for new files, pushing a heartbeat to an uptime monitor, or refreshing a cache that is allowed to be at most sixty seconds stale. If your requirement is measured in seconds rather than minutes, cron is the wrong layer entirely.

It is also the fastest way to prove a new crontab entry actually works. Install it with a command that appends a timestamp to a log file, wait two minutes, and you have confirmed the daemon is running, the user's environment resolves the binary, and the output redirection lands where you expect. Once that is proven, widen the schedule to something you can live with, such as every 5 minutes.

The overlap trap

Cron never waits for the previous run to finish. If your job usually takes forty seconds and one day takes ninety, you now have two copies running at once, and by the time it takes three minutes you have a small stampede competing for the same database rows. Guard against it with flock, a lock file, or a scheduler-level concurrency setting: prefixing the command with flock -n /tmp/job.lock is the one-line fix on Linux.

The second cost is noise. A job that runs every minute produces 1,440 log lines, 1,440 metric points and 1,440 chances to email you a stray stderr line every day. Redirect output deliberately and make the job silent on success, or MAILTO will bury the one failure that mattered under a week of routine chatter.

Changing the interval

Every variant of this schedule is a change to the first field only. Replace the leading asterisk with a step to thin it out, a range to confine it to part of the hour, or a list to pin it to exact minutes. The other four fields stay wildcards until you want to restrict the hour, date, month or weekday.

Two adjustments cover most cases: a step such as every fifteen minutes for polling that does not need to be tight, and a range plus a step for work you only want during the day, which is what every 5 minutes between 9 and 5 does. Build either one visually in the cron expression generator and check the preview before you install it.

Build a variant of this schedule with dropdowns and check the next ten runs before you install it.

Open the cron generator

Related cron examples

Browse every schedule on the cron expression generator, read the cron expression syntax guide for the rules behind the five fields, or the developer tools guides for the longer explanations.