stackoverflow.com CodeIgniter worked in command line but not in cronjob
+ 0

I have some code that I need to run in cron job, and my command is as follows: php path/to/my/code/index.php cron_job testing; When I did that in shell, it worked, it printed command line. However, when it’s running in command line, it didn’t work, it ran the default controller instead. I have done error_log($this->uri->ruri_string()), it shows the default controller.