Sachin Sachin - 3 months ago 51
PHP Question

How to set cron job url for 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.

Answer

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