I have the following syntax (which I think is correcT?) but it runs the command every minute!
* */4 * * * /cmd.sh
|
feedback
|
That's probably how I would do it. This will run the job every 4 hours, on the hours of 00:00, 04:00, 08:00 12:00, 16:00, 20:00. This is just a little more verbose way of writing */4, but it should work the same. | ||||
|
feedback
|
|
That will run the job every minute hours evenly divisible by 4. You want:
That will run on the 15th minute after every hour. Put your favorite minute number in there. If you want to run once an hour on hours divisible by 4, do:
| |||||||||
feedback
|
|
Do a crontab -e and then add the following entry 0 */4 * * * path_to_the_script This will the script every 4 hours. | |||
|
feedback
|
|
The problem is the * in the first column
this translates into run each minute of the hour, but only do it every 2 hours | |||
|
feedback
|