Cron job no longer working

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
nbkgamers
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Apr 20, 2017 5:14 am

Cron job no longer working

Post by nbkgamers »

For some reason the following commands aren't executed while in our crontab.

I don't know if it's something I did or what but I need help figuring this one out.

MAILTO=""
01 00 * * * wget -O http://classiccustom.site.nfoservers.com/vip/delete.php >/dev/null 2>&1
30 00 * * * wget -O http://classiccustom.site.nfoservers.co ... rabxml.php >/dev/null 2>&1
30 12 * * * wget -O http://classiccustom.site.nfoservers.co ... rabxml.php >/dev/null 2>&1
nbkgamers
New to forums
New to forums
Posts: 2
Joined: Thu Apr 20, 2017 5:14 am

Re: Cron job no longer working

Post by nbkgamers »

Who ever tested delete.php... I got the emails that it was ran.. which I don't from the crontab.
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Cron job no longer working

Post by Edge100x »

You should avoid running your scripts by downloading the page like that when you are executing them locally. Instead, run the script directly. This might, for instance, require changing a line to:

01 00 * * * cd ~/public/vip && php delete.php >/dev/null 2>&1

Running the script directly is far more efficient and avoids possible problems with rate-limiting or using up your allowed connections.

If you really, really want to keep downloading a webpage, you will need to change the wget invocation, as what you have is invalid -- "-O" needs to be removed or followed by the output filename. Or, you could use "curl" instead.
Post Reply