Community discussions

 
hci
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri May 28, 2004 5:10 pm

Auto Update Script

Fri Jan 18, 2019 9:43 pm

I have a router that I want to update but not tell 3am. I have this scheduler script.

/system scheduler
add interval=1d name=system_update on-event="/system package update\r\
\ncheck-for-updates once\r\
\n:delay 1s;\r\
\n:if ( [get status] = \"New version is available\") do={ install }\r\
\n" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jan/01/2000 start-time=03:00:00

After it updates I want the scheduler disabled. How would I have it disable itself but still run the update once?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Auto Update Script

Sat Jan 19, 2019 10:04 am

To disable a scheduler
/system scheduler set disabled=yes [find name=system_update on-even]
name= put the name of the scheduler to disable.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 

Who is online

Users browsing this forum: No registered users and 14 guests