I have created a cron job from cpanel. The command is
php /home/userdir/www/index.php Messages test
The controller Messages and the method test just inserts a record in a temporary table.
When I run the following from command prompt on my laptop running windows, it runs fine.
php c:/wamp/www/project/index.php Messages test
This works perfectly.
However, on the hosted server running Linux, I get a mail from the server which has the html for the home page. It does not even go to the Messages->test method.
Please help.