如何设置codeigniter的cron作业url? [英] How to set cron job url for codeigniter?
问题描述
我为我的网站使用Codeigniter。我必须使用cron job来运行一个控制器功能。我在网站使用路线。而且我也不使用index.php在url。
例如。 http://my-domain.com/welcome/show ,这里的欢迎是我的控制器,显示的是函数名称控制器。
我已经这样使用了
0 * * * * php / home / username / public_html / welcome / show
正在给予无此类目录
如何在CPANEL中为上述URL设置cron jon。
谢谢。
我在下面使用cron
php / full-path-to-cron- cron.php / test / index
source: http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter /
这适用于我。
感谢所有
I am using Codeigniter for my website. I have to use cron job to run one of controller function. I am using route in website. And also I am not using index.php in url.
e.g. http://my-domain.com/welcome/show, here welcome is my controller and show is function name of that controller.
I have used like this,
0 * * * * php /home/username/public_html/welcome/show
It is giving 'No such directory'
How can I set cron jon in CPANEL for above url.
Thanks.
I have used below cron
php /full-path-to-cron-file/cron.php /test/index
source: http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/
This works for me.
Thanks to all
这篇关于如何设置codeigniter的cron作业url?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!