Cron Jobs停止了工作
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 rather 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.
我已经运行了几个月的每日cron作业,它工作正常。 cron作业运行 执行数据库操作的php脚本然后将我的电子邮件地址与结果一起邮寄。 很明天,当脚本运行时,数据库操作停止工作,但它会向我发送电子邮件。 我更改了php脚本以发送不同的电子邮件,但它仍然向我发送旧的。 我似乎无法运行任何新脚本,当我为cron作业设置电子邮件地址以运行它时 发送一个。 p>
我是否想过如何让这个回到正轨? p>
更多信息: 我使用的是linux OS cPanel。 p>
我使用了以下命令。 / usr / bin / php -f / home / [user] / public_html / [script to script] / usr / bin / php -q / home / [user] / public_html / [脚本路径] / usr / local / bin / php -f / home / [user] / public_html / [脚本路径] / usr / local / bin / php -q / home / [user] / public_html / [path to script] p>
PHP说PHP的路径是/ usr / bin / php然而,它曾经工作过 当地的一部分在那里。 p>
@ DampeS8N-我不愿意。 PHP脚本只包含一些sql命令和一个邮件功能。 它在浏览器访问时没有任何错误,工作正常。
@ Paul-这是我倾向于相信的。 我认为Cron守护进程不知何故卡住 em>。 当我尝试添加新的cron作业时,它们不会注册为关闭,并且当cron应该关闭时它不会向我的电子邮件地址发送电子邮件。 p>
我是cron的新手。 我在cPanel X中访问cron作业。我很确定我不使用crontab。 您希望我采取的任何行动的详细说明都会很棒。 strong> p>
div>
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.