1. 安装ntpdate工具
yum -y install ntp ntpdate
2. 设置系统时间和网络事件同步
ntpdate 0.asia.pool.ntp.org
3. date命令查看
4. 设置定时任务,周期更新时间
crontab -e
以每小时更新时间为例:
5. 重新加载定时任务
service crond reload
6. 重启定时任务
service crond restart
7. 查看定时任务运行状态
service crond status