0

Am trying to run a controller action as a cron job, but it is giving me the message, "could not open input file"

To do the above, i used this link, http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line....

But not working for me, I also tried to place the cron dispatcher in /app/webroot, but still not working for me.

thanks...

texpert
  • 162
  • 2
  • 16

2 Answers2

2

PHP cannot load your cron_dispatcher.php. Make sure your cron entry is correct, i.e. points to the correct full path of your PHP file. Also make sure that you have your access rights correctly. It's possible that the file exists but that when PHP runs under cron, it is not allowed to read the file.

PS: Have you considered using CakePHP's Shell functionality instead of this dispatcher? It was designed for CLI use.

Sander Marechal
  • 22,978
  • 13
  • 65
  • 96
-1

Call direct your action

wget http://www.example.com/homes/my

in my action wirte your code

set in cpanel ....

Cake PHP
  • 163
  • 5
  • 12
  • This is not the good way it will create file on server, and some server stops wget command for security reason. – nbhatti2001 Jul 31 '13 at 12:49