如何调试似乎没有运行的 PHP CRON 脚本? [英] How can I debug a PHP CRON script that does not appear to be running?

查看:32
本文介绍了如何调试似乎没有运行的 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.

有什么想法吗?

推荐答案

小清单:

  1. 您的 cron 是否正在运行 -> u2ix [已检查]
  2. 使用 cron 的权限 [已检查]
  3. 您的脚本是否在 shell 中运行 [检查我希望]
  4. 运行一个小脚本,显示您的 cron (-> env) 中的环境/它从不与您的 shell 中的一样 :-)
  5. 在使用corntab -l crontab 执行你的php-creat-cronjob-script 检查后
  1. Is your cron running -> u2ix [checked]
  2. Permissions to use cron [checked]
  3. Does your script run in the shell [checked i hope]
  4. Run a litte script that shows you the environmet in your cron (-> env) / it is never the same as in your shell :-)
  5. after execute your php-creat-cronjob-script check with corntab -l the crontab

--你从你的 cron 收到邮件吗?

-- do you get mail from your cron ?

这篇关于如何调试似乎没有运行的 PHP CRON 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆