How do you run a cron job every minute only on specific hours? Like so:
It will only check every minute from 11AM to 12AM, 4PM to 5PM and 9PM to 10PM
It seems to be complicated to me I don’t know where to start.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right solution:
Because if you use previous solution:
Job will start at 12:40 or 17:59. It is not in range from 11AM to 12AM, 4PM to 5PM and 9PM to 10PM.
UPDATE:
Traditional (inherited from Unix) cron format consists of five fields separated by white spaces:
nnCron can use both traditional and “enhanced” version of cron format, which has an additional (6th) field: Year.