Running Cron Every X Minutes

I keep forgetting the correct…

Login

Blog History

I keep forgetting the correct format of cron entries to have a command run every three minutes

To do it every three minutes you need to make the syntax */3 not simply 3 (which means on the 3rd minute of every hour)

# m h  dom mon dow   command
*/3 * * * * /home/user/bin/mycommand

This cron job now runs as I want...

# m h dom mon dow command
The above is the format eg.
m = minutes
h = hours
dom = day month
mon = month
dow = day of week
command = command

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.