#!/bin/bash
#
while true
do
Process_ID=`ps -ef |grep 'LoginSinaWeiboCookie.jar' |grep -v grep |awk '{print $2}'`
Cookie_DIR=/home/chenpenghui/crawler/LoginSinaWeiboCookie
kill - $Process_ID
cd $Cookie_DIR
java -jar LoginSinaWeiboCookie.jar -Xmx256M
sleep 12h
done
12小时,强行重启一次。