63

Is this the correct way for setting a cron job to run every 3 hours? After setting it this way, cron is executing the command every minute.

enter image description here

Elise van Looij
  • 4,162
  • 3
  • 29
  • 52
consigliere
  • 957
  • 2
  • 12
  • 21

3 Answers3

135

Change Minute to be 0. That's it :)

Note: you can check your "crons" in http://cronchecker.net/

Example

Aman Aggarwal
  • 17,619
  • 9
  • 53
  • 81
jimm-cl
  • 5,124
  • 2
  • 25
  • 27
42

Change Minute parameter to 0.

You can set the cron for every three hours as:

0 */3 * * * your command here ..

Aman Aggarwal
  • 17,619
  • 9
  • 53
  • 81
16

The unix setup should be like the following:

 0 */3 * * * sh cron/update_old_citations.sh

good reference for how to set various settings in cron at: http://www.thegeekstuff.com/2011/07/cron-every-5-minutes/

shacharsol
  • 2,326
  • 20
  • 14