首页 > 其他 > 详细

crontab 导入任务列表

时间:2014-08-21 15:19:16      阅读:314      评论:0      收藏:0      [点我收藏+]

crontab 导入任务列表

crontab filename      #导入任务列表,导入会把之前的清除


[root@host]# crontab -l | grep -v "#" > file.txt
[root@host]# echo "* * * * * echo ok" >> file.txt
[root@host]# crontab file.txt


[root@host]# cat file.txt 
MAILTO=""
*/30 * * * * sh /usr/shell/updatetime.sh

[root@host]# crontab file.txt 

[root@host]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (file.txt installed on Thu Aug 21 11:00:57 2014)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
MAILTO=""
*/30 * * * * sh /usr/shell/updatetime.sh

[root@host]# /etc/init.d/crond restart


crontab 导入任务列表,布布扣,bubuko.com

crontab 导入任务列表

原文:http://ltlwx.blog.51cto.com/813478/1542983

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