
vi /etc/rc3.d/
完整过程: 
#!/bin/bash#chkconfig: 2345 88 99#description:auto_run# 开机自启动同步时间yum info ntp && ntpdate cn.ntp.org.cn
crontab -e
* * * * * command
30 21 * * * /usr/local/etc/rc.d/lighttpd restart上面的例子表示每晚的 21:30 重启 apache 。45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart上面的例子表示每月 1 、 10 、 22 日的 4 : 45 重启 apache 。10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart上面的例子表示每周六、周日的 1 : 10 重启 apache 。0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart上面的例子表示在每天 18 : 00 至 23 : 00 之间每隔 30 分钟重启 apache 。0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart上面的例子表示每星期六的 11 : 00 pm 重启 apache 。* */2 * * * /usr/local/etc/rc.d/lighttpd restart每两小时重启 apache* 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart晚上 11 点到早上 7 点之间,每隔一小时重启 apache0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart每月的 4 号与每周一到周三的 11 点重启 apache0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart一月一号的 4 点重启 apache-- (功能描述:显示年月日时分秒)date "+%Y%m%d%H%M%S"



在定时任务中设置每隔一分钟创建一个文件夹

