Chinaunix

标题: shell脚本定时循环启动 [打印本页]

作者: blueghost_mt    时间: 2012-12-18 15:57
标题: shell脚本定时循环启动
我编译了个shell脚本mysql_monitor.sh用于检测服务器的启动状况,一旦错误会发送信息到我的手机
我现在想内部设置一个脚本让mysql_monitor.sh这个脚本每固定的时间启动一次,该如何做
我大概知道使用crontab,但不熟悉,希望熟悉的大侠能详细的解释下
作者: cuteorange    时间: 2012-12-18 17:21
man crontab
作者: blueghost_mt    时间: 2012-12-18 17:27
回复 2# cuteorange
能详细些么~~比如我想每10分钟启动一次

   
作者: cuteorange    时间: 2012-12-18 19:58
回复 3# blueghost_mt


    */10 * * * * Command
作者: Shell_HAT    时间: 2012-12-18 20:07
0,10,20,30,40,50 * * * * Command
作者: Shell_HAT    时间: 2012-12-18 20:09
回复 3# blueghost_mt


这里有教程:
http://linux.vbird.org/linux_basic/0430cron.php
作者: blueghost_mt    时间: 2012-12-19 10:06
回复 6# Shell_HAT

多谢,我已经自己搞定了~
   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2