0

我刚刚使用 magento connect 的 1.8.0.0 版本升级了我的 magento 安装。

我使用“Magento connect”将magento升级到1.8.0.0,从那时起出现以下消息

Cronjob status: Cron.php doesn’t seem to be set up properly. Cron did not execute within the last 15 minutes. Please make sure to set up the cronjob as explained here and check the cron status 15 minutes after setting up the cronjob properly again. 

自升级以来,所有计划的作业(库存导入/订单导出、日志清理等)都已停止。

我的 crontab 是:

$ crontab -l
*/5 * * * * wget  -O /dev/null -q http://localhost/cron.php > /dev/null

并从 shell 手动执行 wget

wget  -O /dev/null -q -S http://localhost/cron.php 
  HTTP/1.1 200 OK
  Date: Thu, 26 Sep 2013 07:10:10 GMT
  Server: Apache
  X-Powered-By: PHP/5.3.21 ZendServer/5.0
  Vary: Accept-Encoding
  Keep-Alive: timeout=5, max=99
  Connection: Keep-Alive
  Transfer-Encoding: chunked
  Content-Type: text/html

我已经安装了 Aoe 调度程序,它显示了一长串待处理的作业

任何地方都没有错误(apache日志,magento日志,...)

我该如何解决这个问题?

谢谢你。

更新:调用shell脚本重新激活了心跳......我仍然不明白问题出在哪里

*/5 * * * * /var/www/magento/htdocs/cron.sh > /dev/null
4

2 回答 2

3

这是解决方案http://www.magentocommerce.com/boards/viewthread/609113/#t462030

我有同样的问题,升级到 1.8.0.0 后,我的 cron 死了。

  • 编辑文件 cron.php
  • $isShellDisabled = (stripos(PHP_OS, ‘win’) === false) ? $isShellDisabled : true;#47 左右添加这行代码

    $isShellDisabled = true;

于 2013-11-19T02:34:15.123 回答
1

Magento 文件夹的根目录中有一个文件,名为

cron.php

这是您的系统 unix cron 运行的文件,它管理 Magento 的 cron 作业。换句话说,你的系统cron.php每分钟运行一次这个文件,这个文件检查 Magento 的 cron 配置,并运行任何计划的作业。

由于某种原因,此命令未在您的系统中运行。这意味着有人cron.php从您的系统中删除crontab,或者当命令运行时出现错误。

尝试跳上您的服务器并自己运行命令

$ php cron.php

我猜你是否会看到某种错误。此错误是您的 cron 作业未运行的原因。修好它,你会很高兴的。

于 2013-09-26T21:08:35.407 回答