windows 服务器同步互联网时间

@echo off
::netsh ipsec static set policy name=7road assign=n
net time /setsntp:pool.ntp.org
net stop w32time
net start w32time
w32tm /resync
w32tm /resync
w32tm /resync
::netsh ipsec static set policy name=7road assign=y
exit

 Linux自动同步时间:

*/8 * * * * /usr/sbin/ntpdate asia.pool.ntp.org >>/root/web.time
 

systemctl stop ntpd
ntpdate ntp1.aliyun.com

posted @ 2017-02-20 11:45  Mr黄瑞  阅读(289)  评论(0编辑  收藏  举报