I am getting Bad Hour error for below peice of code in crontab*/05 17-05 * * * wget -q -O /dev/null http://abcd/cron/abcdIs there any issue with this. I want the cron to run from evening 5 PM to morning 5 AM
Getting a Bad Hour Error in crontab
cron
As you are not specifying which system you are using, I am hoping your system use a Vixie or Vixie-related crontab utility.Still:17-05: is not considered a proper range (the lower limit being greater than the higher limit of the range).You could instead write: 17-23,00-05From man 5 crontab: Ranges of numbers are allowed.  Ranges are two numbers separated with ahyphen.  The specified range is inclusive.   For example, 8-11 for an``hours'' entry specifies execution at hours 8, 9,  10 and 11.So, sure nothing really forbiding you to write an interval the way you did.The Extensions part of man 5 crontab is also interesting regarding how other crontab utilities would allow you specify more than a simple range (your system might be one of these): Lists and ranges are allowed to co-exist in the same field. 1-3,7-9 would be rejected by ATT or BSD cron -- they want tosee 1-3 or 7,8,9 ONLY.So, as you can see, it really depends on your system crontab ability to understand what you mean by 17-05.For more information:man 5 crontab (the vixie cron)