Hello all, I'm new to running scripts using Cron so I need some help. I have a .php file that will run fine when I access it from the browser, but when I try and run it using the code 15 * * * * http://pathname.php. I've also tried wget -q --delete-after --http-user=user --http-passwd=password http://pathname.php. Neither of which seem to work. Can someone lead me in the right direction to get this script to run using Cron? Thanks for any and all input!
install the php5-cli package. That will allow you to run a php file from the command line. Code: 10 * * * * php -f /path/to/php/file.php >/dev/null 2>&1 the >/dev/null 2>&1 will make no output or rather put it to /dev/null so that no email with the result is sent to the system user that uses this cron.
So I contacted the webhost (Lunarpages) and they told me to run this command Code: 10 * * * * php /path/to/php/file.php The only problem I see is that the page that I'm trying to run is password protected. How do I deal with this?