安装ntpdate
yum install ntpdate -y
配置定时任务
crontab -e
*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com
查看定时服务的状态
systemctl status crond
设置定时服务开机自启
systemctl enable crond
yum install ntpdate -y
crontab -e
*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com
systemctl status crond
systemctl enable crond