简体   繁体   English

PHP Cron作业-未指定输入文件“ SOMETIME”

[英]PHP Cron job - no input file specified “SOMETIME”

I have PHP cron job which runs every 30 minutes. 我有PHP cron作业,每30分钟运行一次。 PHP cron job is running in Godaddy hosted environment and Godaddy has told that it is not their problem. PHP cron作业正在Godaddy托管环境中运行,Godaddy告知这不是他们的问题。 I run the PHP like this 我像这样运行PHP

/web/cgi-bin/php5 "$HOME/html/wp-content/themes/twentyten/totalview.php" / web / cgi-bin / php5“ $ HOME / html / wp-content / themes / twentyten / totalview.php”

Code inside the totalview.php is totalview.php中的代码是

<?php
include_once("../../../wp-config.php");
include_once("tplinclude/functions.php");
session_start();

    $res=mysql_query("select sum(`total_num`) from `some_table`");
    $row = mysql_fetch_row($res);
    echo $row[0] ;
?>

But once in a while this will give error message, 但是有时这会给出错误消息,


Status: 404 Not Found Content-type: text/html 状态:404找不到内容类型:text / html

No input file specified. 未指定输入文件。


Problem is that I get this error only SOMETIME. 问题是我只能在某个时间得到此错误。 For example out of 48 execution 8-10 times it will show this error. 例如,在48次执行8-10次之后,它将显示此错误。 Rest it will work fine. 休息一下就可以了。 I pull some data from database, so I know that it works most of the time. 我从数据库中提取了一些数据,所以我知道它在大多数情况下都有效。

But why it gives error sometime ? 但是为什么有时会出错?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM