标签:style http color os io 使用 ar 文件 数据
业务背景:0 1 * * * root /dbdata/backup/cms/async.sh
#!/bin/bash
Dir="/home/webtrn/CrontabDir"
echo `date +"%Y-%m-%d-%H-%M"` >> $Dir/checklearntime.log
wget -t1 http://www.baidu.com/checkserver/XXX.jsp -o $Dir/wgetchecklearntime.log
grep -q "404" $Dir/wgetchecklearntime.log || grep -q "302" $Dir/wgetchecklearntime.log
if [ $? != 0 ]; then
echo "checklearntime have done" >> $Dir/checklearntime.log
else
echo "checklearntime is error" >> $Dir/checklearntime.log
echo "checklearntime is error" | mail -s "webtrn" zhugaojian@whaty.com
echo "checklearntime is error" | mail -s "webtrn" jinqingwen@whaty.com
fi
rm -f XXX.jsp
rm -f $Dir/wgetchecklearntime.log
标签:style http color os io 使用 ar 文件 数据
原文地址:http://blog.csdn.net/yaerfeng/article/details/39178933