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 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') 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 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! 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
Archived
This topic is now archived and is closed to further replies.