0

http://www.myweb.com/dev/admin/reports/trigger_crone/

reports is my controller and trigger_crone is my action

i want to trigger action of my controller in cakephp

I used following line and command to trigger this page

php -f http://www.drvoxx.com/dev/admin/reports/trigger_crone/ >/dev/null

can any one tell me where is the problem

Thanks in advance

  • You should use [Shells & Tasks](http://book.cakephp.org/2.0/en/console-and-shells.html#console-and-shells) for cronjobs. You probably will need to move your `Controller` code into a `Component`. – noslone Jan 21 '14 at 10:00
  • 1
    You don't use controllers or components in shells... If you have to it's an indicator for a bad application architecture. The code should be in a model, this way it can be shared (and tests) very easy with shells. See this question http://stackoverflow.com/questions/18446184/cakephp-2-3-cron-dispatcher/18446486#18446486 and answer. – floriank Jan 21 '14 at 14:06

0 Answers0