linux定期判断网站可否打开
2013-04-05 13:07
225 查看
wget http://www.shopindream.de/200.php --timeout=2 c_monitor=$? rm -rf 200.php if [ ! $c_monitor = "0" ]; then echo "# Error Cannot open shopindream.de, time: " $(date +"%y-%m-%d %H:%M:%S") "restart lnmp.. " | mail -s "Website is offline." 747890528@qq.com /usr/local/php/sbin/php-fpm restart service mysql restart fi
然后是设定权限:
chmod 777 /root/test200_monitor.sh
运行定时程序:
crontab -e
输入以下内容每隔5分钟检测一次
*/5 * * * * /root/test200_monitor.sh
相关文章推荐
- 当本机通过代理服务器上网时,本机无法打开在本机上的虚拟机(oracle vm)linux系统上的网站,但是局域网里的其他机器却可以打开
- 判断网站是微信打开的
- [Ubuntu] Linux下使用google app engine,无法打开https网站的解决方法
- php里判断一个网站和网页是否能打开
- Linux下使用goagent,无法打开https网站的解决方法
- php里判断一个网站和网页是否能打开
- 网站打开慢之学习mysql慢查询和linux top命令
- JS判断手机打开PC网站的时候跳转到移动端网站
- php里判断一个网站和网页是否能打开
- 未备案域名打开国内服务器上的网站(绑定国外空间并判断url后跳转引用)
- 在java 中判断网站正确打开
- [修改]脚本判断网站是否能打开
- 如何用.net程序来判断一个网站是否正常打开小解
- 根据浏览器内核判断是web/iOS/android/ipad/iphone 来打开不同的网站或页面
- 生产环境Mysql数据库备份脚本,Linux下网站数据定期自动备份与删除脚本,Windows下备份网站目录和数据库
- php判断远程文件或网站是否能打开
- linux定期备份网站网页
- linux实现固定时刻打开网站
- linux下进程的最大线程数、进程最大数、进程打开的文件数
- Linux下打开rar压缩文件