![]() |
Set time limit on spider.php or number of pages
Hi
I use a commercial server which has limits to the amount of resources I can use with spider.php. They've warned me before about the script taking up too many resources and are threatening to shut me down. I usually give spider.php a list of 30 sites (level0 spidering depth) to spider at a time as a cron job Can I limit spider.php to run a maximim of 10 minutes even if it hasn't completed a cron job on a list of url's, to help prevent my site from being shut down by an angry administrator? Thx Paul L |
Hi. If your host allows, set a cron job like so:
Code:
10 * * * * ps -ef | grep 'php -f spider.php' | awk '{print $2}' | xargs kill -9 |
All times are GMT -8. The time now is 07:28 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.