I'm working on a script that checks every minute if the current time is between 8am and 10pm, if that's true, i enable the wlan1, if it's not, i disable it.
I know that can be made with a simple scheduler at 8am and another one at 10pm, but the problem is if the router is turned off during those hours, it wont run the scheduler.
For now i managed to make that script, the problem is it resets the connection every time it runs, the only solution i could think of is checking if the interface is already enabled before doing it again, but i haven't found any way to check for that in a script. Does anyone have any idea how to make this possible? thank you very much in advance.