1、编辑定时任务文件
vim /etc/crontab
2、添加定时任务内容
添加如下信息,表示每晚1点执行 /home下xxx.sh脚本
00 01 * * * root /home/xxx.sh
3、重启定时任务
systemctl restart crond.service
vim /etc/crontab
添加如下信息,表示每晚1点执行 /home下xxx.sh脚本
00 01 * * * root /home/xxx.sh
systemctl restart crond.service