Cron: Every 5 Minutes

The expression, what it means, and when it next runs.

Runs entirely in your browser

Loading the tool…

Five fields: minute, hour, day of the month, month, day of the week. Shorthand like @daily works too.

—

What each field means
Next runs your local time

    Add it with crontab -e. Cron runs it with a bare environment, so give every command its full path.

    The expression is */5 * * * *. The slash is a step: it means every fifth value of the minute field rather than the fifth minute, so the job fires at :00, :05, :10 and so on through the hour.

    */5 is not the same as "five minutes after it last ran." It fires on the clock, at minutes divisible by five, so a job started at 12:03 waits two minutes for its first run and then settles onto the pattern. Nothing accumulates drift, which is the advantage of the schedule over a sleep loop.

    The trap at this frequency is overlap. Cron starts a new run whether or not the last one has finished, so anything that occasionally takes more than five minutes will eventually have two copies of itself running. A lock file or flock around the command is the usual fix, and it is not optional at this interval.

    Edit any field to change the schedule. There is also every hour and every day at midnight.

    How to use it

    1. Read the expression above and the plain English underneath it.
    2. Check the next run times, which are worked out from your own clock.
    3. Edit any field to change the schedule, and copy the line when it is right.

    Questions

    What does */5 mean in cron?

    Every fifth value of that field, counting from zero, so in the minute field it means :00, :05, :10 and onward. It is a step rather than an offset, which is why the job lands on the clock instead of five minutes after whenever it happened to start.

    Will two runs overlap if one is slow?

    Yes. Cron fires on schedule regardless of whether the previous run has finished, so a job that sometimes takes over five minutes will sometimes run twice at once. Wrap the command in flock, or have the script take a lock itself, before putting anything on this schedule.

    Which timezone does cron use?

    The server's, not yours. The next run times here are shown in your local time because that is the clock this page can see, so on a machine set to UTC the real firing times will differ by your offset. It is the single most common reason a job runs at an unexpected hour.

    Where does this line go?

    Into a crontab, edited with crontab -e, one schedule and command per line. The five fields are minute, hour, day of month, month and day of week, and the command follows them on the same line.

    Other schedules

    The same generator on a different expression. Each explains itself and shows when it next fires.

    Your data stays on your device

    Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. You can load this page once, go offline, and it still works.

    This page makes no requests at all, to anywhere. That is not a promise in the copy: it is a Content-Security-Policy header your browser enforces, and connect-src on it is none. Open the network tab and watch nothing happen.