【问题标题】:Kohana 3.2 Cron in Cpanel not workingCpanel中的Kohana 3.2 Cron不工作
【发布时间】:2016-06-17 04:32:43
【问题描述】:

您好,我在我的 cpanel 中设置了一个每分钟运行的 cron 作业:

/usr/bin/php /home/mysite/public_html/index.php --uri="cron/test"

上面的 cron 正在通过我的 index.php,因为如果它在我的 cron 控制器“cron/test”上没有运行,我会记录它。

在我的 index.php 中,我这样做只是为了测试目的,我得到了 indexcall.txt:

$fp = fopen('indexcalled.txt', 'a+');
fwrite($fp, "POST: " . serialize($_POST));
fwrite($fp, '-----------');
fwrite($fp, "GET:" . serialize($_GET) . "\r\n");
fclose($fp);

在我的 Cron 控制器中我有这个,但我没有得到 crontest.txt

public function action_test() {
   $fp = fopen('crontest.txt', 'w+'); 
   fwrite($fp, date("Y-m-d H:i:s") . "cron test initiating...\n\n");   
   fclose($fp);
}

有什么我做的不对或者我可能忘记设置了吗?

【问题讨论】:

    标签: cron cpanel kohana


    【解决方案1】:

    你在 cron 作业中尝试过 curl 命令吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-31
      • 2014-12-15
      • 2019-05-06
      • 2011-08-31
      • 2015-12-13
      • 1970-01-01
      相关资源
      最近更新 更多