tags:

views:

33

answers:

1

Hi all,

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...

+2  A: 

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