Using WGET in a Cronjob not working



I am using the following line in the cronjob web panel on dreamhost:

/usr/bin/wget -O - -p

the cronjob does run since I get a confirmation email, but the script isnt running because in the email it says:


which i imagine means that the url got cut off after “Illusion”, how to i get wget to use the whole URL that i give it and not cuttoff??

Any help would be appreciated.




Stick quotation marks around the URL.


alright, that worked, now in the email it says the whole URL that i gave it. But, i dont feel as though its actually loading the URL or visiting it, because in my data base I keep track of every page visit, and this one is not showing up. Any ideas??


You do realize the "Location: " line is indicative of a redirect? When I visit the URL, I get a 404 instead. The output from wget should tell you if it followed a redirect and indicate what it downloaded. It seems like you are leaving out details.


Here is the actually cron, I had edited the URL for security reasons sorry,

/usr/bin/wget -O - -p “

Do you see anything wrong with this? It doesnt seem to be running either now, its set to run every 10 minutes…


And now that URL returns a status code 200 with no content. Why don’t you try testing the URL in a browser first unless that is expected behavior. Then try running the command from a shell session.

Also, try dropping the -p parameter. wget hung when I tried it from a shell session. You don’t need to download the CSS/images etc do you?


Thanks for helping! I think i finally got it to work. Sorry the URL didn’t work, my editor for some reasons crashes sometimes and deletes the whole file, so you were looking at an empty file for sure haha. Luckily i had it backed up… But removing the -p seemed to be the issue. Thanks!