duanquyong8164 2010-12-20 17:47
浏览 40
已采纳

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.

  • 写回答

1条回答 默认 最新

  • duan01203 2010-12-28 17:58
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度