0

I want to run cron job every night at 1am and after that every 3 hours from morning 10am-6pm only.

0 1,10-18/3 * * *

Is this the correct format?

0

Personally I would simple spell out the hours rather than using the step. Even though your syntax seems correct 10-18/3 looks awkward to me.

0 1,10,13,16 * * * command

Immediately makes clear what you intend. (And notice how every three hours between 10AM And 6PM is only ten AM, one and four PM.)

  • yeah, makes more sense. – Ted Khi Dec 20 '18 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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