Useless Windows Networking tip of the day: network time

Gnu

OSNN Addict
Joined
20 Jun 2004
Messages
129
Something I clumsily discovered today whilst breaking various things in my network.

I use XP's built-in NNTP client to synchronise time over the internet, but I wanted a way to synchronise the time across all of my machines, especially my 98 box, without having to run a bunch of NNTP clients and/or running an NNTP server. I tripped over Windows' NET TIME command, which apparently works on every Windows platform with networking installed!

I simply wrote a one-line batch file:
net time \\gnu01 /set /yes

... where gnu01 would be the name of the machine you're retrieving the time from. Setting the batch properties to run minimised and close on exit's a good idea, while you're at it. Then just schedule a task to run your batch file (fight the urge to name your batch file time.bat, as it will likely conflict with the command interpreter's TIME function). Set it to run daily, and voila -- perfectly synched time across your network with minimal hassle. Now I have one PC retrieving the time across the internet, and the rest grabbing their time from that PC.

Now I'm wondering if I can do this in Samba, as well -- I'll have to give it a look on my Linux box later.
 
Yea, I've used that for a while now. A neat tip for those network admins out there, put it into your user's Domain/AD logon scripts, and install a NTP Timeserver Sync (to an internet server like time.nist.gov) on the server. That way all my client workstations are sycned to the server at logon.

JJB
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back