/system scheduler add name=dnsS interval=5 on-event={:local dname ;:foreach i in=[/ip dns cache find static=no] do={; :set dname [/ip dns cache get $i name] ; :if ([/ip dns static find name=$dname]="") do={/ip dns static add name=$dname address=192.168.2.1};};/ip dns cache flush}