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.
|