The easy way to run a job every 5 minutes is to use */5 for the minute. So to run a cleanup script every 5 minutes use: (crontab -e)

*/5 * * * * /usr/local/bin/cleanup.sh

The format of the cron is:

#min hour dayofmonth month dayofweek commandtorun
*/10 * * * * /usr/local/bin/cleanup.sh

Would run it every 10 minutes. Alternatively, you could use:

0,10,20,30,40,50 * * * * /usr/local/bin/cleanup.sh

Leave a Reply