Hallo,
After upgrade ROS 4011 to 7.15.3 have a error in log with the script running in sheduler: executing script from scheduler failed, please check it manually
Please help to find howto update script to bypass error. Thank you.
# define variables
:local list
:local comment
:local newip
:local oldip
# Loop through each entry in the address list.
:foreach i in=[/ip firewall address-list find] do={
# Get the first five characters of the list name
:set list [:pick [/ip firewall address-list get $i list] 0 5]
# If they're 'host_', then we've got a match - process it
:if ($list = "host_") do={
# Get the comment for this address list item (this is the host name to use)
:set comment [/ip firewall address-list get $i comment]
:set oldip [/ip firewall address-list get $i address]
:set newip [:resolve $comment server 9.9.9.9]
# Resolve it and set the address list entry accordingly.
:if ($newip != $oldip) do={
/ip firewall address-list set $i address=$newip
}
}
}