Page 1 of 1
Script Help Needed..
Posted: Fri Feb 26, 2010 8:05 pm
by mherbst01
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?
Re: Script Help Needed..
Posted: Fri Feb 26, 2010 8:13 pm
by fewi
/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}"
Re: Script Help Needed..
Posted: Fri Feb 26, 2010 10:43 pm
by mherbst01
Thank you very much, just put it in for tomorrow... Thanks again
Re: Script Help Needed..
Posted: Thu Mar 04, 2010 6:26 pm
by mherbst01
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?
Re: Script Help Needed..
Posted: Thu Mar 04, 2010 7:00 pm
by fewi
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.
Re: Script Help Needed..
Posted: Thu Mar 04, 2010 7:03 pm
by changeip
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.