I have made a herku app for cakephp app that want to run a controller action(function) after every 1 hour on heroku. How Can I setup cronjob for controller action on heroku? I am using heroku schedular for run job horly want want to know how to setup cronjob for controller action?
Asked
Active
Viewed 998 times
1 Answers
0
You don't call controllers via cron... Use a shell instead and don't instantiate the controller inside the shell. If you think you have to it's an indicator for a pretty bad application architecture and you should refactor your code.
See this question CakePHP 2.3 - cron dispatcher and answer.