Community discussions

MikroTik App
 
lctn
Member Candidate
Member Candidate
Topic Author
Posts: 176
Joined: Tue Apr 04, 2006 3:51 pm

Script not running at startup

Fri May 05, 2017 11:45 pm

I am working with 750 box, attempting to get a script to run on startup. Script runs fine manually. I have altered the delay from 10-60 to see if that made a difference but it did not

I have the following in system scheduler:
add name=2 on-event="/system script run di
sen" disabled=no start-time=startup interval=0

My script is simple:

0 name="disen" owner="admin"
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,
api
last-started=may/05/2017 15:37:11 run-count=14 source=
:delay 60
/interface eoip disable 0
/interface eoip enable 0
 
mikronsultiK
just joined
Posts: 23
Joined: Wed Feb 01, 2017 12:57 am
Location: Italy
Contact:

Re: Script not running at startup

Mon May 08, 2017 12:47 pm

In the scheduler just use the script name . So please try replacing
on-event="/system script run disen"
with
on-event=disen

Other aspect is to just leave checked all the policy to execute the script; then define accurately the proper working subset of policy to leave active.
 
lctn
Member Candidate
Member Candidate
Topic Author
Posts: 176
Joined: Tue Apr 04, 2006 3:51 pm

Re: Script not running at startup

Mon May 08, 2017 3:50 pm

When I do that, the script name comes up red in scheduler:

# NAME START-DATE START-TIME INTERVAL ON-EVENT RUN-COUNT
0 rst-I... startup 0s disen
 
mikronsultiK
just joined
Posts: 23
Joined: Wed Feb 01, 2017 12:57 am
Location: Italy
Contact:

Re: Script not running at startup

Mon May 08, 2017 4:12 pm

please may you provide the output of
/system scheduler export  
/system script export 
 
lctn
Member Candidate
Member Candidate
Topic Author
Posts: 176
Joined: Tue Apr 04, 2006 3:51 pm

Re: Script not running at startup

Mon May 08, 2017 4:21 pm

/system scheduler
add disabled=no interval=0s name=rst-Interface on-event=disen policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-time=startup

/system script
add name=disen policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="/interface eoip disable 0\
\n/interface eoip enable 0\
\n"
 
mikronsultiK
just joined
Posts: 23
Joined: Wed Feb 01, 2017 12:57 am
Location: Italy
Contact:

Re: Script not running at startup

Mon May 08, 2017 4:48 pm

I was testing that script and scheduling on RoueterOS 6.37.1 and 6.39.1 and it's ok but api policy not recognized

What RoS are u using ?
 
lctn
Member Candidate
Member Candidate
Topic Author
Posts: 176
Joined: Tue Apr 04, 2006 3:51 pm

Re: Script not running at startup

Mon May 08, 2017 5:12 pm

I am a long way away from 6x. These boxes are only configured for eoip tunnels.

routerboard: yes
model: 750GL

current-firmware: 2.36
upgrade-firmware: 2.35
Last edited by lctn on Tue Apr 26, 2022 7:51 pm, edited 1 time in total.
 
lctn
Member Candidate
Member Candidate
Topic Author
Posts: 176
Joined: Tue Apr 04, 2006 3:51 pm

Re: Script not running at startup

Mon May 08, 2017 5:53 pm

Was able to upgrade to 5.26

routerboard: yes
model: 750GL

current-firmware: 2.36
upgrade-firmware: 3.09


Script still does not run though

Who is online

Users browsing this forum: jaclaz and 199 guests