hello to everyone here,
i would like to automatically switch off the wifi after a certain time at night if no user is connected anymore.
I inserted the following code (which btw I found in this forum) in the "on event" field of a schedule task but it's not working:
if ( ([/interface wireless monitor wlan1 as-value once]->"connected-clients")=0 ) do={/interface wireless disable wlan1}
I also tried with "authenticated-clients" and "registered-clients" but no one is doing the job. I guess I have an error in the code , so I would be very thankful if someone who is familiar with the script language could give a look!
(btw: the task to switch on the wifi in the morning is working fine which the following line: /interface wireless enable wlan1)