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

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

任何想法? / p>

Any ideas?

推荐答案

小清单:


  1. 您的cron正在运行 - > u2ix [checked]

  2. 使用cron的权限[已检查]


  3. 运行一个litte脚本,显示cron( - > env)中的环境,它永远不会像shell中一样:-)

  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天全站免登陆