0

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?

Aryan
  • 21
  • 4

1 Answers1

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.

Community
  • 1
  • 1
floriank
  • 25,546
  • 9
  • 42
  • 66