Alex Rivera | Logout

Crontab every 5 minutes

Asked 2012-06-29T10:46:58.850
22

How could i tell crontab to run every 5 minutes, but starting at the second minute of the hour. In other words, i would like to execute my script when minute % 5 = 2.

For example, my script should run at :

08:02
08:07
08:12
08:17
...

Thanks for your help!

Edit
Report

1 Answer

38

There are two possibilities:

2,7,12,17... command
*/5 ....     sleep 120 ; command
  1. Write explicit all minutes in crontab
  2. Run sleep command before the actual command
answered 2012-06-29T10:53:31.157

Your Answer