Skip to content
Advertisement

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.

Advertisement

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

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement