Linux 定时任务 闯哥哥 2020-09-09 203 阅读1分钟 1、添加定时任务 vim /etc/crontab */1 * * * * root /opt/clean_docker_log/clean_docker_log.sh 2、重启定时任务 (1)centos7:systemctl restart crond (2)ubuntu:service cron restart 3、日志查看 tail -f /var/log/cron.log 4、设置定时任务开机自启 systemctl enable crond