How to call a controller/action in crontab?
Posted January 8, 2008on:
If you want to call a controller/action in crontab, you simply must:
1. create a copy of index.php in your app’s webroot directory,
and rename it to cron_dispatcher.php or to any filename.
2. after this, somewhere in line 78 of index.php of your app’s webroot directory,
this code will get argument from php commandline having index = 1.
so, in your crontab,
* * * * php -q /var/www/html/cake/webroot/cron_dispatcher.php Controller/action