Skip to main content

*/5 does not start five minutes from now

*/5 * * * * is locked to the clock. Save at 10:03 and the next run is 10:05 — not five minutes after you edit the file.

Updated 1 min readMarkdown
*/5 does not start five minutes from now

*/5 does not mean five minutes after you save. The crontab line */5 * * * * is locked to the clock. It fires on minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55. Save at 10:03 and the next run is 10:05, then 10:10.

*/5 * * * *

*/10, */15, and */30 work the same way and still include minute 0. 5-59/5 skips 0 on purpose. To wait five minutes from an arbitrary moment, sleep or use a queue delay — cron will not.

Build, then install

Build the fields in the cron expression generator, then copy them onto the host. The generator does not install anything. Five fields, no seconds. Use an absolute path for the command.

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

No comments yet. Be the first to comment.