14定时任务 定时任务 crontab安装crontab一般centos安装了crontab 1yum install crontabs 查看运行状态123systemctl status crondsystemctl enable crondsystemctl start crond 查询定时任务列表1crontab -l 管理定时任务列表实际上就是一个文件 123crontab -e0 19 * * * bash /root/test.sh cron表达式12345678# .---------------- 分钟,取值范围为 0-59# | .------------- 小时,取值范围为 0-23# | | .---------- 日,取值范围为 1-31# | | | .------- 月,取值范围为 1-12# | | | | .---- 星期,取值范围为 0-7,0 和 7 都表示星期日# | | | | | .-- 要执行的命令# | | | | | | 0 19 * * * bash /root/test.sh 直接操作文件实现管理任务1echo "*/10 * * * * "$base_path/change_images.sh >> /var/spool/cron/root linux #linux 14定时任务 https://jiajun.xyz/2021/08/24/linux/14定时任务/ 作者 Lambda 发布于 2021年8月24日 许可协议 12状态一致性 上一篇 09checkpoint 下一篇