Community discussions

MikroTik App
 
mherbst01
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Mon Dec 01, 2008 8:09 pm

Script Help Needed..

Fri Feb 26, 2010 8:05 pm

I've never done a script and I use winbox to configure and monitor my RB's.. I would like a script that would run every morning and just disable and enable one of my wlan. Is this possible and would anyone please help me in accomplishing this?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Script Help Needed..

Fri Feb 26, 2010 8:13 pm

/system scheduler add name=restartWLAN start-date=jan/01/1970 start-time=05:00:00 interval=24h on-event=":foreach interface in=[/interface wireless find] do={/interface wireless disable \$interface; /interface wireless enable \$interface}"
 
mherbst01
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Mon Dec 01, 2008 8:09 pm

Re: Script Help Needed..

Fri Feb 26, 2010 10:43 pm

Thank you very much, just put it in for tomorrow... Thanks again
 
mherbst01
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Mon Dec 01, 2008 8:09 pm

Re: Script Help Needed..

Thu Mar 04, 2010 6:26 pm

I put that in and I haven't seen it take affect.. it claims its run but it doesn't appear to have run. Do I need to put something under /system scripts also?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Script Help Needed..

Thu Mar 04, 2010 7:00 pm

How do you determine it has no effect?

You can try putting the script under "/system script" and run it manually - does it work then? Then change the scheduled job to run the script in "/system script" instead of running it directly.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: Script Help Needed..

Thu Mar 04, 2010 7:03 pm

its not reliable to put the actual script in the scheduler. use the scheduler to call a script only. just enter the single name of the script and it will run it.