摘要:
在chinaunix上问了很久没找到解决方案自己动手丰衣足食脚本如下#!/bin/bashc=$(ps -ef|grep python |grep -v "grep"|wc -l)if [ $c -lt 1 ]then python /home/spider/spider.py &fi保存文件名为 xxx.sh运行命令 :crontab -e在 nano里面 添加*/分钟 * * * * sh 文件的路径ctrl+xY回车/etc/init.d/cron restart 阅读全文