I am trying to call a Codeigniter controller through a cron job. But something is going wrong, I am not getting the desired result. I tried to access the same controller through the PHP CLI and instead of returning the output that the controller should return, it outputs the contents of the project homepage. This question has a similar problem.
My crontab has the following entry:
22 13 * * * php /var/www/html/projectfolder/index.php cronJobGmutrrPdt runJobForUpdatingClgRevConnSummary
But this is not working, so I tried to run it through the CLI:
php /var/www/html/projectfolder/index.php cronJobGmutrrPdt runJobForUpdatingClgRevConnSummary
In this case the CLI runs but instead of outputting the controller's output it outputs the contents of the default controller that is the project homepage.