OpenWrt Forum Archive

Topic: Scheduled Tasks

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hello,
i am using scheduled tasks for enabling/disabling wlan. excample:

30 23 * * 0-6 uci set wireless.@wifi-device[0].disabled=1; uci commit wireless; wifi
0 5 * * 0-6 uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi

for a shortime a configured a second wlan (named "wlanForGuest"), and now i would like to upgrade my scheduled tasks. what is the correct name in the scheduled tasks?

wifi-device[1] ???

or

wifi-device['wlanForGuest'] ???

i am using tp-link 1043nd and OpenWrt Barrier Breaker 14.07 (+LUCI)

uci show wireless will show you which radios are which as well as using LUCI and choosing network -> wireless

Your script is switching on/off the whole wifi device, not a single interface... If you want to control interfaces, use "set wireless.@wifi-iface[x].disabled" instead; you can also use "set wireless.your_ssid_here.disabled".

Give your interfaces specific names in /etc/config/wireless:

config wifi-iface 'guest'
    option mode 'ap'
   etc

Then you can set wireless.guest.disabled=1, and always be referring to the guests' AP.

It would also be clearer to write small scripts and execute them from chron.

The discussion might have continued from here.