一.安装 crontabs服务并设置开机自启:
yum install crontabs
systemctl enable crond
systemctl start crond123
二.设置用户自定义定时任务:
vi /etc/crontab
可以看到:
# Example of job definition:# .—————- minute (0 – 59)# | .————- hour (0 – 23)# | | .———- day of month (1 – 31)# | | | .——- month (1 – 12) OR jan,feb,mar,apr