如何调试似乎没有运行的 PHP CRON 脚本? [英] How can I debug a PHP CRON script that does not appear to be running?
本文介绍了如何调试似乎没有运行的 PHP CRON 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 PHP 设置 CRON 作业,但到目前为止我没有任何运气.
I am trying to setup a CRON job using PHP, but am not having any luck so far.
我正在学习本教程:PHP - 使用 PHP 创建 Cron 作业(死链接)
I am following this tutorial: PHP - Create a Cron Job with PHP (dead link)
我已经用正确的权限创建了脚本文件,但脚本没有被处理.
I have created the script file with the correct permissions, but the script is not being processed.
有什么想法吗?
推荐答案
小清单:
- 您的 cron 是否正在运行 -> u2ix [已检查]
- 使用 cron 的权限 [已检查]
- 您的脚本是否在 shell 中运行 [检查我希望]
- 运行一个小脚本,显示您的 cron (-> env) 中的环境/它从不与您的 shell 中的一样 :-)
- 在使用corntab -l crontab 执行你的php-creat-cronjob-script 检查后
- Is your cron running -> u2ix [checked]
- Permissions to use cron [checked]
- Does your script run in the shell [checked i hope]
- Run a litte script that shows you the environmet in your cron (-> env) / it is never the same as in your shell :-)
- after execute your php-creat-cronjob-script check with corntab -l the crontab
--你从你的 cron 收到邮件吗?
-- do you get mail from your cron ?
这篇关于如何调试似乎没有运行的 PHP CRON 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文