Linux crontab 定时任务Demo

# 查看定时任务
crontab -l
#编辑定时任务
crontab -e
#  同步时间
*/2 * * * * /usr/sbin/ntpdate -u 127.0.0.1
# 定时删除文件
*/24 * * * * /usr/bin/find /data/myfile -name "myfile*.gz" -mtime +30 -exec rm -f {} \;

 

posted @ 2015-09-16 12:14  er_bao  阅读(357)  评论(0编辑  收藏  举报