cakephp:作为cron作业运行控制器操作不工作 [英] cakephp: running controller action as a cron job not working

查看:142
本文介绍了cakephp:作为cron作业运行控制器操作不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试作为cron作业运行控制器操作,但它给我的消息,无法打开输入文件

Am trying to run a controller action as a cron job, but it is giving me the message, "could not open input file"

要做上述,我使用这个链接, http: //bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line ...

To do the above, i used this link, http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line....

但是没有为我工作,我也试图将cron dispatcher放在/ app / webroot,但仍然不为我工作。

But not working for me, I also tried to place the cron dispatcher in /app/webroot, but still not working for me.

谢谢...


thanks...

推荐答案

PHP无法加载您的cron_dispatcher.php。确保您的cron条目正确,即指向您的PHP文件的正确的完整路径。还要确保您具有正确的访问权限。这可能是文件存在,但是当PHP在cron下运行时,不允许读取该文件。

PHP cannot load your cron_dispatcher.php. Make sure your cron entry is correct, i.e. points to the correct full path of your PHP file. Also make sure that you have your access rights correctly. It's possible that the file exists but that when PHP runs under cron, it is not allowed to read the file.

PS:你考虑过使用CakePHP的Shell功能调度员?它是为CLI使用而设计的。

PS: Have you considered using CakePHP's Shell functionality instead of this dispatcher? It was designed for CLI use.

这篇关于cakephp:作为cron作业运行控制器操作不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆