Script/schedule to enable wlan1 on certain days

I have been trying to figure out how to schedule a script to enable/disable a wlan1 at different times for different days of the week.

For example

wlan 1 on Monday-Thursday from 9am to 8pm
wlan 1 on Friday-Saturday from 10am to 6pm

I would like to disable wlan1 except for the days/times listed above.

Is there anyway to schedule this? I currently have a schedule and scrip to turn wlan on and off at the same time every day 7 days a week but I would like to be able to customize it so that I can turn wlan1 on and off as listed above.

Thanks,
Chadd

Hi,

Without getting into serious scripting, the simple way to do this is have a few schedules, run at 7 day intervals. No seriousscripting skills required.

First schedule runs at Monday at 9am, then repeats after 7 days, turning lwan1 on. (/interface wireless enable wlan1; )
Second Schedule runs on Monday at 8pm, repeats every 7d, turns wlan 1 off. (/interface wireless disable wlan1; )

Repeat the two schedules for each day/time period want to you want to cover.

It’s not pretty, but it is safe and effective. Using timers (keeping a script job open) has the downside that if the unit repowers, the script is cancelled.

Regards
Brian
Zimbabwe

Thanks for the reply, oddly enough I ended up doing something similar. I ended up creating several scrips and schedules that will enable/disable the schedules based on a 7 day interval. It appears to be working so far but I will need to let it run a full week before I am sure.

I have 6 schedules and 6 scripts to do it.

Thanks,
Chadd

You don’t need the scripts. Put the code you have in those scripts, in the scheduler in place of the code you are using to call the script. Keeps it simple.

Cheers
Brian

In week time to revise the strategy, hard work

Thanks for the tip i will try it out