Turning off WiFi at night on Mikrotik RouterOS
If you think that you must turn off WiFi at night due to security reasons or looking for a healthy rest time, here is how to do that on Mikrotik RouterOS.

To program a Mikrotik router for turning off and on WiFi you must use scripting and scheduling capabilities fo RouterOS.
The command you must run to turn off WiFi is:
interface wireless disable <interface-name>
So you have to wrote a very small script with just that command. Using WinBox:
Open System->Scriptswindow- Press
Addbutton and the script editor window will open- Type a script name like
DisableWLAN - Select required policies or check all of them
- Type script into the
Sourcetext area:interface wireless disable <interface-name> - You can to test the script with
Run Scriptbutton - Save the script with
Okbutton
- Type a script name like
Now create a similar EnableWLAN script with the opposite command:
interface wireless enable <interface-name>
Next add the schedule scripts:
Open System->Schedulerwindow- Press
Addbutton to open theSchedulerwindow- Type some meaningful name for the scheduled task like
CronDisableWLAN(can be the same as the script’s) - Type the name of your script,
DisableWLAN, into theOn Eventtext area - Select the
start date(i.e today),start time(hh:mm:ssformat, i.e.23:00:00) and theintervalfor repeating the action like1d 00:00:00 - Select required policies or check them all
- Save the schedule with
Okbutton
- Type some meaningful name for the scheduled task like
Repeat the same to schedule the enabling script (i.e. CronEnableWLAN starting at 09:00:00 with an interval of 1d 00:00:00)
Now your Mikrotik router will turn off and on at your desired times.
Good rest !
Research Gate
Google Scholar