DEV Community

Cover image for */5 in crontab: cron every 5 minutes
Ameen Usman
Ameen Usman

Posted on

*/5 in crontab: cron every 5 minutes

*/5 in a crontab means every five minutes. The full line is */5 * * * *. It runs at minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55 of every hour — locked to the clock, not to the minute you saved the file.

Build the five fields in the cron expression generator. The page does not install the job. Copy the expression into the crontab on the machine that will run it.

The minute list

*/5 * * * *     # 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55
*/10 * * * *    # 0, 10, 20, 30, 40, 50
*/15 * * * *    # 0, 15, 30, 45
*/30 * * * *    # 0 and 30
Enter fullscreen mode Exit fullscreen mode

Install the line at 10:03 and the next run is 10:05, then 10:10. The schedule does not remember when you edited the file. 5-59/5 * * * * is different: minute 0 is skipped. For a plain every-five-minutes job, keep */5 * * * *.

Five fields only

Minute, hour, day of month, month, day of week. There is no seconds field. Do not paste a Quartz or EventBridge line into a five-field crontab. Call the program by its absolute path. Cron's PATH is often short.

Guide: https://kepttools.com/guides/cron-every-5-minutes

Top comments (0)