I am trying to run a daily PHP script with cron job. I use godaddy cron manager and have that setup correctly. After the set time passes, the script has not run and I get no email response with an error or success message. To me that says that the cron didnt even run. I know the script works because I see the results when I type the php file into a web browser, the script is working. My question: Is there something I am missing? Or is there another way to run a php script every day? Here is the script I am using. And after investing so much time into Cron Jobs I do have to ask, is there an easier way to have a quote of the day? Thanks in advance for your continued assistance!
Try my service http://www.setcronjob.com/ You can create cron jobs to run your script every day. It's free
Thanks for the link. I will consider it. Anyone know how to work around this without signing up for another service? Thanks all.
That link you suggest isnt going to work. Really I want to set it and not have to worry about it expiring. I also dont feel I should pay as I am already paying for service which should provide this. Surely someone must know how to properly setup a cron job to run a PHP script through godaddy. Anyone?
Hi krebs, I think you'd better contact godaddy, and they will give you the instruction. You paid for your service, so don't hesitate to ask them. About the expiry date, it's a limit of my service. You can try onlinecronjobs.com (for sale??, and must verify your site by putting a txt file), or cronless.com where you can create cron jobs every day for free without expiry date. Hope this helps Kind regards, Nguyen An Thuan.
Just wonder that if the target is one's web browser, why not just to have a random quote at any time someone browses to your site? Moreover, these quotes need not to be a secured matter, so you must keep them on your server... do they? Then I think it shall be run on a client side browser instead. Unless you have your own purpose Regards,
When I run into this problem it's usually due to the way cron finds and interacts with the file. I can only offer two suggestions. Try each. Both won't work -- only one will. 1. /opt/curlssl/bin/curl -s http://www.website.com/script.php 2. cd /home/username/public_html/directory && ./script.php In #2, replace /home/username/public_html/directory with the PATH to your php file and the directory it sits in. And don't remove the " && ./" part.
Great thanks for the assistance. I actually contacted Godaddy support and they figured it out. There was a problem on Godaddy's end and the jobs weren't being sent at all. The first 2 calls to support the douche bag on the phone said it was a problem with my script. Finally they sent my query to advanced support who figured it out immediately. Sometimes I love being right... thanks again.