maxhugen Posted November 21, 2008 Share Posted November 21, 2008 I've set up a PHP page with some code that updates a database table. It runs once an hour using Cron, using the following command: wget http://www.myDomain.com/adm/SetRandomOrder.php The PHP script itself works fine; my problem is that cron (or the wget command?) is saving a copy of the php page every time it runs. How can I prevent the page being saved? Should I use some sort of quit or exit command in the PHP script at the end of the function I'm running? MTIA Quote Link to comment https://forums.phpfreaks.com/topic/133716-solved-using-cron-to-run-php-script/ Share on other sites More sharing options...
flyhoney Posted November 21, 2008 Share Posted November 21, 2008 Adjust the wget command to write the file to /dev/null wget http://www.myDomain.com/adm/SetRandomOrder.php -O /dev/null (thats an 'Oh' not a 'zero') Quote Link to comment https://forums.phpfreaks.com/topic/133716-solved-using-cron-to-run-php-script/#findComment-695860 Share on other sites More sharing options...
flyhoney Posted November 21, 2008 Share Posted November 21, 2008 Sorry, that should be: wget -O /dev/null http://www.myDomain.com/adm/SetRandomOrder.php Quote Link to comment https://forums.phpfreaks.com/topic/133716-solved-using-cron-to-run-php-script/#findComment-695868 Share on other sites More sharing options...
maxhugen Posted November 22, 2008 Author Share Posted November 22, 2008 Great, thanks very much! Quote Link to comment https://forums.phpfreaks.com/topic/133716-solved-using-cron-to-run-php-script/#findComment-695911 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.