Cron Jobs stopped working
I've been running a daily cron job for a few months and it was working fine. The cron job runs a php script that does a database action then mails my email address with the results. Suddenly a few days ago, when the script ran, the database action stopped working, but it would send me the email. I changed the php script to send a different email, but it still sends me the old one. I can't seem to get any new scripts to run and when I set up an email address for the cron job to run it doesn't send one.
Any thought as to how I can get this back on track?
More information: I use a linux OS cPanel.
I've used the following commands. /usr/bin/php -f /home/[user]/public_html/[path to script] /usr/bin/php -q /home/[user]/public_html/[path to script] /usr/local/bin/php -f /home/[user]/public_html/[path to script] /usr/local/bin/php -q /home/[user]/public_html/[path to script]
PHP says that the path to PHP is /usr/bin/php however, it used to work with the local part in there.
@DampeS8N- I'd r开发者_如何学编程ather not. The PHP script just includes a few sql commands and a mail function. It works fine without any errors when visited by browser. @Paul- That is what I am inclined to believe. I think the Cron Daemon is stuck somehow. When I try to add new cron jobs, they don't register as going off, and it won't send emails to my email address when a cron should go off.
I am a complete newbie to cron. I access cron jobs in my cPanel X. I'm pretty sure I don't use crontab. Detailed instructions for any actions you'd like me to take would be great.
Well, I wound up contacting my hosting support. Turns out the domain was moved to a new server and the cron jobs were still running on the old one.
精彩评论