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 {} ;
原文地址:https://www.cnblogs.com/web1992/p/4812924.html