服务管理:systemctl start crond.service
查看定时任务:crontab -l
新增定时任务:crontab -e
定时任务规则解释:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*对应 一小时的第几分钟 一天的第几小时 月的第几天 一年的第几月 一周的第几天
常用特殊符号:
/ 步长
* 全部
,多个值分隔
- 连续