项目服务器是台式主机,系统时间走着走着就慢了,开启同步网络时间也不起作用,最后没折,在win系统里加了个服务,每分钟执行下边脚本同步时间一次,问题才解决
主板电池没电了,写个开机自动同步网络时间的脚本,设置为开机自动执行,设置NTP服务器为ntp5.aliyun.com
net stop w32time
w32tm /unregister
w32tm /register
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxNegPhaseCorrection /t reg_dword /d 0xFFFFFFFF /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxPosPhaseCorrection /t reg_dword /d 0xFFFFFFFF /f
net start w32time
w32tm /resync
w32tm /resync
#pause