首页 > 其他 > 详细

CronTab命令实例

时间:2014-12-21 18:02:45      阅读:206      评论:0      收藏:0      [点我收藏+]


每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命令实例

原文:http://blog.csdn.net/christprince007/article/details/42061355

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!