Setting PC Clock

Is there a way that I can set the PC clock with scripting? I have a situation where the Gateway PC needs to match the time of the SQLServer PC. Unfortunately, the customer does not synchonize the times themselves.

Basically, it would suffice if Computer A set the time on Computer B once every hour. I already have a server app running that records the network status, and it would be a perfect place to add this code. Doable?

No, I would say this just isn’t possible from inside of Ignition. Instead, I’d look for one of the many clock synchronizing tools out there. I’ve actually never used one personally, but I’ve seen many customers who have, so they can’t be too hard to find. Maybe someone else can chime in with a suggestion.


You can set the clocks via NTP (network time protocol), which should be supported by every OS. You can have all the clients point to an Internet server or run your own NTP server. It will work on an isolated network, but will obviously be more accurate if the one computer has Internet access.

If both machines are on a Windows domain, The DC has a NTP service installed by default. You can simply setup a group policy to push the current time from the DC to the whole AD.

Linux machines can just have their time sync pointed directly at the DC. Most distros come w/ NTPD support installed as well, so that could be your authoritative machine.