Add this script at any name (I'm using the name: Back2Time)
Copy and paste the following code
when run it it makes 3 changes.
a) make a backup file (bktime)
b) make a schedule to restore the above file (bksch)
c) make a new script with a name like (!Startet at 18.25.51 and Revert after 10m - Run me to Finalize Changes)
(because of the ! at start the script is on top of the script list)
If you run the script the file bktime the schedule bksh and the script deleted
If wait for 10 min's the scheduler restore the bktime file and the router configuration revert 10 min's back
Code: Select all
:local timetorevert "10m"
:local hourt [:pick [/system clock get time] 0 2]
:local mint [:pick [/system clock get time] 3 5]
:local sect [:pick [/system clock get time] 6 8]
:local timet "$hourt.$mint.$sect"
:if ([:len [/file find name=bktime.backup]] > 0) do={/file remove bktime.backup}
:do { /system scheduler remove bksch;} on-error={ };
#:if ([:len [/system scheduler name=bksch]] > 0) do={/system scheduler remove bksch}
:delay 2
/system backup save name=bktime dont-encrypt=yes password=123
/system scheduler add interval=$timetorevert name=bksch on-event="/system backup load name=bktime.backup password=123
/file remove bktime.backup
/system scheduler remove bksch"
/system script add name="!Startet at $timet and Revert after $timetorevert - Run me to Finalize Changes" source="/file remove bktime.backup
/system scheduler remove bksch
/system script remove \"!Startet at $timet and Revert after $timetorevert - Run me to Finalize Changes\"
"