Script Help Needed..

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?

/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}"

Thank you very much, just put it in for tomorrow… Thanks again

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?

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.

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.