16

I'd to update my Windows 8 clock with the internet every time I boot the system maybe with a script that I set to be executed at system startup (like that option in the Date and Time window in the tab Internet Time > Change settings... > Update now).

The reason is that I'm having some problems with system cloak and the answer to this question would solve it.

Note: the option Synchronize with a Internet time server is marked and the time server is time.windows.com.

I have a laptop with Ubuntu and Windows 8 in dual-boot.

Zignd
  • 561
  • 4
  • 10
  • 20
  • Windows already does this out of the box. – Ramhound Jun 03 '13 at 14:17
  • 1
    It may do, but not in my case. I think the problem is because of Ubuntu on dual-boot. – Zignd Jun 04 '13 at 00:36
  • @Zignd: Have you tried to use [w32tm](http://technet.microsoft.com/en-us/library/cc773263%28v=ws.10%29.aspx) as mentioned [here](http://superuser.com/questions/548401/portable-command-line-for-syncing-windows-os-clock-to-a-ntp-server)? – Karan Jun 04 '13 at 23:09
  • @Karan I discovered this command while looking at the links duDE provided on the answer below, but the problem is that this command require administrator privileges and I'm currently looking for it on the internet. – Zignd Jun 05 '13 at 01:02

2 Answers2

19

1. Configure the windows time service to update the time more frequently.

Control Panel -> Date and Time -> Internet Time tab.

Check the box "Synchronise with an internet time server" If no server is selected choose either "time.windows.com" or "pool.ntp.org".

This will automatically set the time once per week, which should keep your computer within a few seconds of the correct time. If you are running an important server you may need to set it more often. To do that you need to edit the registry.

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\ NtpClient, and check the the value SpecialPollInterval. This is in seconds.

The default is 604800, which is the number of seconds in a week. For daily time checks, choose 86400. Unless you have very special requirements you won't need more than daily. Four hours would be every 14400.

2: Configure the system to force-update the time on boot.

To do a force-update you need to run the following as administrator (or system):

SC START w32time task_started

So to force update on boot, you need to run that command as administrator. You can do that using Task Scheduler. To do this run the following as administrator:

schtasks /CREATE /TN "Set Time On Start" /SC ONSTART /RU SYSTEM /TR "SC START w32time task_started"
Ben
  • 1,445
  • 1
  • 10
  • 12
  • 1
    It's better to run `%windir%\system32\w32tm.exe /resync` after `SC START w32time task_started`. That command ensure/force time update regardless registry settings... – gavenkoa Jun 26 '17 at 08:27
1

I think, you need only to activate the Windows Time Service in your Settings - it shall take care of a windows' clock: http://support.ntp.org/bin/view/Support/WindowsTimeService

Beginning with Windows 2000, Microsoft includes the Windows Time Service with all versions of Windows. Initially, the pupose of Windows Time Service was to keep all clocks on the Windows network loosely synchronized to support Kerberos authentication, which is time-sensitive to a degree. Windows Time Service is also known as "w32time", and can be configured with the registry, Group Policy editor GUI tool, or the command-line tool w32tm. ... Stand-alone Windows servers and clients are automatically configured to poll time.windows.com at one-hour intervals. The time.windows.com server (actually a cluster of servers) is maintained by Microsoft. ... An example configuration, suitable for a Windows 2003 standalone server or Primary Domain Controller Emulator in a Active Directory domain: C:>w32tm /config /update /manualpeerlist:"0.pool.ntp.org,0x8 1.pool.ntp.org,0x8 2.pool.ntp.org,0x8 3.pool.ntp.org,0x8" /syncfromflags:MANUAL The above configuration tells Windows Time Service to use four servers from the NTP Pool, and use a client-mode association (identified by the ,0x8 after each server name) to contact them. This configuration is analgous to server directives in the configuration file for ntpd. Note that this configuration should not be used on Windows servers or clients that are members of an Active Directory domain, unless you absolutely want them to ignore time from Active Directory domain controllers on the network.

Leo Chapiro
  • 15,459
  • 5
  • 42
  • 45
  • 3
    The Windows Time Service is already activated, the problem is that it don't do the job. – Zignd Jun 03 '13 at 13:17
  • 1
    Take a look at this thread please: http://www.sevenforums.com/general-discussion/2984-w32time-service-not-starting-automatically.html – Leo Chapiro Jun 03 '13 at 13:18