1. 是否超时
2.防止重复执行,同时执行
3. 超时清除机制
4.异常报警机制
5. 进程冗余机制
6. 逻辑依赖检查
ps -eo pid,args xxx
根据pid 查看进程当时执行的参数
for pid in `ps -eaf | grep xxx | grep xxx | awk '{print $2}' `
do
time=`ps -eo pid,etime,stime | grep pid | awk '{print $2}'`
if [[ "$time" > "xxxx" ]]
then
xxx
else
xxx
fi
done
if [ -f xxx -a `ps -eaf | grep xxx | grep xxx | wc -l ` -gt 2 ]
then
xxx
fi