3

This setting, for every six hours, works fine

0 */6 * * *

But this runs every six hours at 0:00, 6:00, 12:00 and 18:00

Now I want to run every six hours, but starting at 2:00. I read on this simulator that should be

0 2/6 * * *

But crontab is returning an error of "bad hour"

5

You need to provide a range

0 2-23/6 * * * ...

This will run the job daily at 2am, 8am, 2pm, 8pm (i.e. every six hours starting from 02:00). I've never been totally sure whether this is user's local time or system local time, though; I've tended to assume system local time.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.