I am running a cron job using the cron_dispatcher.php file. But I'm getting the following error message:
Undefined variable: argc [APP/webroot/cron_dispatcher.php, line 87]
My Code at Line 87 is
define('CRON_DISPATCHER', true);
if ($argc == 2) {
$Dispatcher = new Dispatcher();
$Dispatcher -> dispatch($argv[1]);
My cron command is /web/cgi-bin/php5 /my/path/to/html/app/webroot/cron_dispatcher.php /users/test/
Thank you.
EDIT Solved:. Solution is run cron command in CLI mode /usr/local/php5/bin/php (Godaddy Server Specific).
It will show error but ultimatly run the controller's action.
Thanks for every one especially "VSTM".