View Single Post
Old 05-01-2004, 07:25 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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

10 * * * *               : complete this line to be 10 minutes after spider start
ps -ef                   : list out the processes
grep 'php -f spider.php' : find the spider process
awk '{print $2}'         : get PID from column two
xargs kill -9            : kill the spider process
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote