1

I am trying to set a cron job in the crontab which would execute my command every day at specific minute of specific hour. I am using the Indian timezone in my server.

If I set the job like below, well ... it executes at specific minute in every hour:

30 * * * * COMMAND

But if I set the job like below, it doesn't execute:

30 15 * * * COMMAND  # not excecuting

Why it is not executing? Where is the problem?

3
  • Given the CRON job starting at 2016-02-18 13:50:05 (now), it would run: 2016-02-18 15:30:00, 2016-02-19 15:30:00, 2016-02-20 15:30:00... – Ramesh Chand Feb 18 '16 at 12:51
  • Check the logs for more detail /var/log/syslog grep CRON /var/log/syslog – Ramesh Chand Feb 18 '16 at 12:53
  • @RameshChand You need a | in there somewhere I think. Also that doesn't run. – Tim Feb 18 '16 at 12:57
1

You can add a cron job like:

30 00,01,02,....23 * * * COMMAND

where you can specify your desired hours as 00,01,02,...23 (separating them with a comma).

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.