码迷,mamicode.com
首页 > 其他好文 > 详细

CronTab命令实例

时间:2017-05-24 22:36:36      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:style   round   apache2   tar   space   date   restart   content   启动   



每2分钟 将date写入到time.log(以下的为奇数分钟运行)
*/2 * * * * date >> ~/time.log
1-59/2 * * * * date >> ~/time.log

每天的23:30分重新启动apache
30 23 * * *   /etc/init.d/apache2 restart
每月的1,10,20号的23:30分重新启动apache
30 23 1,10,20 * * /etc/init.d/apache2 restart

每月的1到15号的23:30重新启动apache
30 23 1-15 * * /etc/init.d/apache2 restart

晚上23点到早上6点之间每30分钟启动一次apache
*/30 23-7 * * * /etc/init.d/apache2 restart
0,30 23-7 * * * /etc/init.d/apache2 restart
0-59/30 23-7 * * * /etc/init.d/apache2 restart






CronTab命令实例

标签:style   round   apache2   tar   space   date   restart   content   启动   

原文地址:http://www.cnblogs.com/wzzkaifa/p/6900949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!