Cronjob not running php script
I set up cronjob with following command:
sudo crontab -e
I tried following statements for cronjob but it doesn't work:
30 2 * * * php -q /path/to/php/script.php
30 2 * * * /usr/bin/php /path/to/php/script.php
30 2 * * * /usr/bin/php -q /path/to/php/script.php
But when I tried the GET method as follows, it works:
30 2 * * * wget http://my.domain.com/path/to/php/script.php
I have a LAMP setup Ubuntu 12.04 (64-bit) system with my PHP version manually upgraded from 5.3 - 5.4 to run modules on my WHMCS installation.
Any idea what's going wrong while running with PHP mode? I don't want to use GET method!