script,error executing script NTP Pool from www failed, please check it manually
script,error,debug expected end of command (line 7 column 47)
If I remove the “,$NTPPoolServer2” from the last line of the script (so that I’m only setting one server) the script succeeds.
I’m sure I’m being stupid and missing something…
How am I being stupid and what am I missing, to allow the /system/ntp/client set servers= command in the script to take two comma-separated variables, please?
Thanks everyone. The set servers=($var1,$var2) works.
About why not use “add” commands, I assume (am I wrong?) that “add”ing would keep adding more and more servers. I just want, at boot and again every 24 hours or so, to refresh two servers. Thus my decision to use an explicit “set servers=” command instead of “add”.
Regarding the suggestion to use WinBox or WebFig and then export, that actually wouldn’t have answered the problem, because the export produces:
/system ntp client
set enabled=yes mode=unicast servers=92.113.12.77,5.250.184.159 vrf=main
.. which doesn’t address the nuance of having to create a ($list, $list) when using variables.
Again, thanks everyone!
RouterOS v7 is being .. an experience .. for me, after so many years on v6.
(I’m finally moving towards v7 in expectation of ever-shorter-TLS-certificate-lifetimes becoming a major management pain, and MikroTik support telling me that they do not intend to ever add automated certificate management to ROSv6 ).
/system ntp client set servers=("0.pool.ntp.org","1.pool.ntp.org")
Every time the server synchronizes, it relies on the TTL provided by the DNS.
The IPs on ntp.org are constantly changing to balance calls,
setting fixed IPs is detrimental to the proper functioning of the system.
It depends on the RouterOS version, which you forgot to specify.
If you read, my post mentions the 7.16.2 export.
If you act like "one version is the same as the other", the answers also have the same characteristics.
Fair point. Somehow I had it stuck in my head (I’m not even sure whether this was ever true ages ago in ROSv6) that the NTP client DIDN’T dynamically look up each time. I’ll switch to the DNS names.