摘要: crontab定时任务(周期性) 一、简介 通过crontab命令可以在固定的间隔执行系统指令或shell脚本 二、crontab配置文件: Linux下的任务调度分为两类:系统任务调度和用户任务调度。 Linux系统任务是由 cron (crond) 这个系统服务来控制的,这个系统服务是默认启动的 阅读全文
posted @ 2019-09-30 21:49 HeiDi_BoKe 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 检查内存使用情况,当内存可使用等于100时,释放缓存 [root@localhost thy]# cat checkMem.sh #!/bin/bash #防止内存溢出问题 used=`free -m | awk 'NR==2' | awk '{print $3}'` free=`free -m | 阅读全文
posted @ 2019-09-30 10:01 HeiDi_BoKe 阅读(1709) 评论(0) 推荐(0) 编辑
摘要: 定时备份数据库是很有必要的 一、脚本内容 二、设置定时任务 设置为每一小时执行备份任务 阅读全文
posted @ 2019-09-30 09:30 HeiDi_BoKe 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 自动监控tomcat服务,当tomcat服务挂掉时自动重启 一、脚本内容 [root@localhost ]# cat /root/autoCheck.sh #!/bin/bash startTomcat=/usr/local/tomcat-7/bin/startup.sh tomcatLog=/t 阅读全文
posted @ 2019-09-30 09:20 HeiDi_BoKe 阅读(494) 评论(0) 推荐(0) 编辑