I would like to run a cronjob on my website.
My application is in a folder called app1
So to refer to my index.php, the path is ./app1/index.php
My controller for cronjobs is Cronjobs.php, which is in the application/controllers folder of CI.
In my controller, there is a method called cleanup.
The command for the cronjob is this:
Code:
/bin/php ./app1/index.php cronjobs cleanup
According to CI's documentation about CLI, this is the correct format.
However, it is only executing the index.php. The e-mail that my hosting provider sends to my admin address, contains all html code of the home page, including a lot of php errors.
What am I doing wrong?