Codeigniter CLI runs in terminal, not in cpanel cron

I'm having trouble setting up cron using CodeIgniter. I followed the documentation and set up a test cron

* * * * * php /home/USERN/public_html/spider/index.php tools message

But that does not work. The output is just the standard index.php controller, not the tool / message. When I run it in the terminal on the server, I get the results that I expect. Is there something I'm doing wrong, or do I need to change something on the server?

+3
source share
1 answer

For cPanel servers, in order for CI to correctly use URI segments, you will need to use

/usr/local/bin/php
+1
source

All Articles