设置服务器同步时间批处理脚本-windows篇

来源:互联网 发布:小甲鱼python书籍 编辑:程序博客网 时间:2024/05/03 01:07

设置服务器同步时间,并且每隔1小时同步一次。


@echo offecho autor OAK@echo offecho --------------------------------@echo offecho setup time resync every one hour@echo offREG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 3600 /f@echo offecho --------------------------------echo setup w32time auto startup@echo offREG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time /v Start /t REG_DWORD /d 2 /f@echo offecho --------------------------------@echo offset /p TimeServer=Please Input The Time Server IP:net time /setsntp:%TimeServer%net stop w32timenet start w32timew32tm /resync




原创粉丝点击