cron No Input Specified

You’ve created your script, tested directly via a browser and get the required results.  You then create your cron job, enter your email address to receive the results and then recieve the following email when it runs:

Status: 404 Not Found
X-Powered-By: PHP/5.3.10
Content-type: text/html

No input file specified.

A small gotcha for those not familiar with Cron jobs is the passing of parameters to your script to run. When passing paramenters you exclude the “?” question mark instead of the usual way parameters are passed in URL’s.

If you wanted to run this script:
php /home/your_site/public_html/your_script.php?report=today

you would use:
php /home/your_site/public_html/your_script.php report=today


Comments are closed.