每天固定時間自動校時。
w32tm /dumpreg /subkey:Config
顯示關聯到登錄機碼的值。

數值名稱                      數值類型                數值資料
------------------------------------------------

LastClockRate             REG_DWORD           156250
MinClockRate              REG_DWORD           155860
MaxClockRate              REG_DWORD           156640
FrequencyCorrectRate      REG_DWORD           4
PollAdjustFactor          REG_DWORD           5
LargePhaseOffset          REG_DWORD           1280000
SpikeWatchPeriod          REG_DWORD           90
HoldPeriod                REG_DWORD           5
MaxPollInterval           REG_DWORD           15
LocalClockDispersion      REG_DWORD           10
EventLogFlags             REG_DWORD           2
PhaseCorrectRate          REG_DWORD           1
MinPollInterval           REG_DWORD           10
UpdateInterval            REG_DWORD           360000
MaxNegPhaseCorrection     REG_DWORD           54000
MaxPosPhaseCorrection     REG_DWORD           54000
AnnounceFlags             REG_DWORD           10
MaxAllowedPhaseOffset     REG_DWORD           1

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
修正 MaxNegPhaseCorrection、MaxPosPhaseCorrection 為 FFFFFFFF。
MaxNegPhaseCorrection (負差校正) - 若網路時間比本地時間慢超過這個秒數就不自動校正。
MaxPosPhaseCorrection (正差校正) - 若網路時間比本地時間快超過這個秒數就不自動校正。

停止 Windows Time 服務,並將自動啟動變更為手動啟動。
在排定的工作中加入以下檔案,並指定於固定的時間執行。

w32time.bat
@echo off
@net start w32time
@w32tm /config /update /manualpeerlist:time.stdtime.gov.tw
@w32tm /resync
@net stop w32time
@echo on
@exit

arrow
arrow
    全站熱搜

    flyfox 發表在 痞客邦 留言(0) 人氣()