Cron Jobs Running wget on Long URLs not Working

Operating System & Version
CENTOS 7.9
cPanel & WHM Version
94.0.4

PostAlmostAnything

Active Member
Mar 3, 2020
34
0
6
Portland, Oregon
cPanel Access Level
Website Owner
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 - "http://example.com/myapplication?&url=https://example.com/wp-content/plugins/myrssfeedplugin/feed.php?category=mycategory&pubdate=new&parameter=MyParameter&parameter2=MySecondParameter&parameter3=mysecondparameter&param3=param3&param4=param4&param5=p5&param6=p6" >/dev/null 2>&1

That job should fire ever 6 hours but has not run for days.
 
Last edited by a moderator:

plesk4lyf

Active Member
PartnerNOC
May 21, 2018
32
4
8
Sydney
cPanel Access Level
Root Administrator
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.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,188
790
313
cPanel Access Level
Root Administrator
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!