资源介绍
windows 下 的 ntpdate.exe
参考用法:
SCHTASKS 命令
@echo off
sc config Schedule start= auto
net start Schedule
SCHTASKS /Create /RU "SYSTEM" /SC HOURLY /TN timesync /TR "C:\WINDOWS\system32\ntpdate.exe -b time.windows.com" /ST 00:00:00 /SD 2000/01/01
SCHTASKS /Create /RU "SYSTEM" /SC ONLOGON /TN timesync2 /TR "C:\WINDOWS\system32\ntpdate.exe -b time.windows.com"
如果用 AT 命令,需要每小时同步则需要添加多个计划任务,如:
at 10:00 /every:M,T,W,Th,F,S,Su "C:\WINDOWS\system32\ntpdate.exe -b time.windows.com"
at 11:00 /every:M,T,W,Th,F,S,Su "C:\WINDOWS\system32\ntpdate.exe -b time.windows.com"