Cron Jobs Running wget on Long URLs not Working
I have a series of wget cron jobs that are not firing and I am wondering if that is because the URLs they are getting are long. It is the only thing about these jobs that I can think of that would keep them from working. That or maybe I just have too many cron jobs scheduled.
Here is a redacted example:
wget -q -O - "/dev/null 2>&1
That job should fire ever 6 hours but has not run for days.
-
Hey dude, That looks fine though if it's not working, why aren't you logging the output? Wouldn't that at least help in your investigating? Remove the -q and change >/dev/null to >> $HOME/cron.log Then you'll have a log so you can see what the issue is. Alternatively you could just run the command manually and see what happens. The problem is that you're not logging anything so you've effectively blindfolded yourself. 0 -
Thanks for those thoughts, @plesk4lyf. I do agree about the logging. If you have root access to the system you could also check /var/log/cron to see if there are any entries there, but the logging steps above should get you more details. I also think running the command manually to see if that works is a great test as well. Let us know what you find! 0
Please sign in to leave a comment.
Comments
2 comments