Windows machines can be set to synchronize their pc clocks with NTP (Network Time Protocol) servers once a week. If your pc is anything like mine, once a week isn’t nearly often enough and it’s easy to forget to do it manually, even though it is both useful and important to have the clock running accurately. Getting Windows to synchronize the pc clock more frequently is surprisingly tricky. So here’s a how-to for Windows 7 and Vista.
First, left-click on the clock in the Windows taskbar and, from the context menu, select Adjust date/time (I am sort of guessing here, I have a Dutch language gui and am unsure about exactly what the English gui says). Select the Internet Time tab and press Change Settings…. In the dialog window that appears next, make sure the Synchronize clock with an internet time server checkbox is checked. IIRC, the time.windows.com server is set by default, but try to find a NTP server nearer to your location (your service provider’s, for instance). The server specified here is used by the task scheduler, which we are accessing next. Click on OK twice to close the respective Date and Time windows.
Click on the Windows Start button to open the Start Menu and in the edit field at the bottom type Task Scheduler (language-dependant) and press Enter to open the Task Scheduler window. Expand the Task Scheduler Library node in the leftmost panel, then expand the Microsoft and the Windows nodes, respectively. Scroll down to the node called Time Synchronization and select it by clicking on it. The center panel will show any task already in this node, and this is where we’ll create a new one. (In fact, it can be created anywhere but if you ever need to make adjustments you’ll know where to find it.)
In the rightmost panel click on Create Task… which should be the second option from above. Enter a Name (mine is Daily Time Synchro) and a Description. Click on Change User or Group and type LOCAL SERVICE in the lower field and click OK. Check Run with highest privileges and select the appropriate Configuration (mine is Windows 7, Server 2008 R2).
Select the Triggers tab and press New…. Select the options you want, my (long-time) settings are On schedule, Daily, 15-3-2011 08:00:00, Recur every 1 days, Enabled. Click OK to close this window and then select the Actions tab. The following steps must be done correctly and in the right order for it to work, so sit up straight and pay attention.
Click on New… on the Actions tab. Select Run a program as the Action and type %windir%\system32\sc.exe in the Program/Script field. In the Add arguments (optional) field type start w32time task_started and click on OK to close the window.
Click again on New… on the Actions tab and select Run a program again as the Action. This time, type %windir%\system32\w32tm.exe in the Program/Script field and add /resync as the argument. Close the window by clicking OK.
Now, go to the Conditions tab and check the Start only if the network connection below is available and select Any connection from the dropdown list.
Finally, go to the Settings tab and check the Run task as soon as possible after a scheduled start is missed. Click OK to save the scheduled task.
Now, test to see if the task you created is working properly. Manually set back the clock a few hours, left-click on the task listed at the top in the center panel of the Task Scheduler and select Run from the context menu. The same context menu allows you to edit all settings, or to delete the task.
And there you have it: a pc clock running accurately all day, every day.