Got one more cronjob question that I cannot wrap my head around. What about 0 hour, is this some special hour?
I got a cronjob with a not too complex script. I make sure it gives some output. Yet it works on:
Manual run
1:10 hours
21:10 hours etc.
But not at: 0:10
It will not run, it will not generate an email because of the output. When I set it to 0:10 and 1:10, it will only run once a day at the latter.
What could be it? I’ve checked the system timezone, seems to be correct.
What else to check or debug? It there something special about 0 hour? On other platforms I could do this without problems, so I’m not aware of any so far.
Straight from the man 5 crontab page. I may have included a few lines too many.
#run at 2:15pm on the first of every month — output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s “It’s 10pm” joe%Joe,%%Where are your kids?%
0 works fine. Something else is causing the behavior you’re seeing, though I don’t know what.
The cron daemon is provided by your OS, so if there’s anything weird about it, it’d be a question for Debian devs. But, I’m 100% sure they wouldn’t make 0 act weird, so it has to be something else.
Quite strange, but since I’ve changed the email where the output goes (Cronjob email per virtual server - #2 by Joe) it seems that it did indeed also run on 0 hour. Strange that it did not mail to the root that time and it did on 1 hour.
Maybe I jumped into conclusions to quick, I will go back testing.
0 hour seems to be just fine, nothing special about it