I have placed the following information into my crontab file by entering "crontab -e" (in both root and "ubuntu" users, on a 32 bit Canonical Ubuntu AWS instance):
@reboot /usr/bin/php /usr/share/nginx/www/cron/updateIp.php
I have also tried:
@reboot /usr/bin/php /usr/share/nginx/www/cron/updateIp.php >> /home/ubuntu/crontab.log
And /home/ubuntu/crontab.log contains nothing after two reboots.
I imagine that php and/or nginx is not loaded when this cronjob is attempting to run?
Without any error logs to check however, I am at a loss as to what to do next..?
EDIT: Even after logging into the box via SSH with the same user that the crontab -e was created under... the cronjob does not run.
EDIT 2: (results of syslog):
Nov 9 13:29:02 ip-10-122-254-128 CRON[603]: (root) CMD (php /usr/share/nginx/www/cron/updateIp.php)
Nov 9 13:29:02 ip-10-122-254-128 CRON[604]: (ubuntu) CMD (/usr/bin/php /usr/share/nginx/www/cron/updateIp.php >> /home/ubuntu/crontab.log 2>&1)
EDIT 3: This link actually provided the answer I was looking for. Apparently I needed to install php-cgi and mention it specifically, even though whereis php does not show it? Simply installing php5-cgi and changing /usr/bin/php to /usr/bin/php-cgi worked like a charm. I already had php5-cli and php5-fpm installed so I figured php5-cgi wasn't necessary, but I suppose it must have been.