CodeIgniter Forums
cli cron job fails to see controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: cli cron job fails to see controller (/showthread.php?tid=70547)



cli cron job fails to see controller - PaulC - 04-25-2018

Hi Team,
The docs seem a little terse to say the least, but I have a problem running my cron job which ran successfully on a similar site.
The site I am having the problem with is up to date with latest CI, and I have chosen to move the application folder outside of the website root, which I understand is a good security thing to do.
The site generally runs well (php5.6), so this CLI problem is a bit odd.

The command I run via the website owners crontab is: /usr/bin/php5.6 /webroot/index.php cron index password. I have also tried Cron as suggested by a post on this sort of problem. Neither works and I end up with the following text in my logs:

ERROR: Not Found

        The controller/method pair you requested was not found.

So, is the cli broken, because it follows the docs quite well?

I have tried changing the file mode of the controller to 755 without any success either.

Can anyone point me in the right direction please?

Thanks, Paul


RE: cli cron job fails to see controller - Narf - 04-25-2018

No, it's not broken.

Debug it as if you see a 404 on the web; it's the exact same thing.


RE: cli cron job fails to see controller - PaulC - 04-25-2018

Sorry - I'm an idiot!
The message is because my code is spitting out 404 error hence this exception.
I hope I havent wasted anyones time :-(