我一直在尝试在magento网站(在子域上)上运行cron任务
Magento version : 1.9.2.4 PHP : 5.6
我在c-panel cron标签
中尝试了以下选项为cron.php文件设置777个permssions
选项1:
* / 15 * * * * php -q /home/XXXX/public_html/newmagento/cron.php
选项2:
0,30 * * * * / bin / sh /home/XXXX/public_html/newmagento/cron.sh
选项3:
0 * * * * php /home/XXXX/public_html/newmagento/cron.php
但我无法使用任何选项
**对电子邮件中收到的crons的回复:**
选项1:
拒绝访问。
选项3:
X-Powered-By:PHP / 5.6.14
内容类型:text / html;字符集= UTF-8
拒绝访问。
选项2
没有电子邮件回复阅读已安装的评论' aoe scheduler'
未找到心跳任务。检查cron是否配置正确。 (见说明)
我修改了cron(来自c-panel),如AOE调度程序所示:
完成所有操作后,我在电子邮件中收到了以下结果
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& / bin / bash /home/XXXX/public_html/newmagento/scheduler_cron.sh --mode always --includeGroups my_queue_jobs
/home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: Resource temporarily unavailable Could not find a binary for php
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& / bin / bash /home/XXXX/public_html/newmagento/scheduler_cron.sh --mode always --excludeGroups my_queue_jobs
/home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: Resource temporarily unavailable
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& / bin / bash /home/XXXX/public_html/newmagento/scheduler_cron.sh --mode default --includeGroups groupC
/home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: Resource temporarily unavailable
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& / bin / bash /home/XXXX/public_html/newmagento/scheduler_cron.sh --mode default --includeGroups groupA,groupB
/home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable /home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: Resource temporarily unavailable
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& / bin / bash /home/XXXX/public_html/newmagento/scheduler_cron.sh --mode default --excludeGroups groupA,groupB,groupC
/bin/bash: fork: retry: Resource temporarily unavailable
/bin/bash: fork: retry: Resource temporarily unavailable
/bin/bash: fork: retry: Resource temporarily unavailable
/bin/bash: fork: retry: Resource temporarily unavailable
/home/XXXX/public_html/newmagento/scheduler_cron.sh: fork: retry: Resource temporarily unavailable
Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.14
Content-type: text/html; charset=UTF-8
! test -e /home/XXXX/public_html/newmagento/maintenance.flag&& cd / home / XXXX / public_html / newmagento / shell&& / usr / bin / php scheduler.php --action watchdog
Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.14
Content-type: text/html; charset=UTF-8
答案 0 :(得分:0)
尝试输出到日志文件以捕获错误,如
0,30 * * * * / bin / sh /home/XXXX/public_html/newmagento/cron.sh>> path_to /磁/变种/ filename.log
在magento var log文件夹中使用日志文件是理想的。
当您选择运行cron.php文件时,请确保php二进制文件并将其与路径一起使用。要查找路径,请使用以下命令
>which php