I use shared hosting so I can’t access to shell.
I have CronsController and i want to run index action of controller.
From cpanel I add cronjob like this:
php -q /home/mysite/public_html/app/crons
But this doesn’t run the crons/index action.
How should I write path to my crons controller?
You should not do that at all. If not properly protected anyone could trigger your controller from the web. Also that’s not what a controller is made for.
Use a shell (or a shell command through cpanel for crons)
Assuming that the CakePHP core is in
You should be able to run it like this:
More details and examples are shown here.