Cron and open WRT on a GL-AR150 router

The crontab file can be found here: /etc/crontab

edit it with vi or nano (opkg update; opkg install nano) and adhere to the crond format explained here: https://wiki.openwrt.org/doc/howto/cron

So to disable your wifi at say 11pm every day and enable it again at 6am every day, you would insert this into crontab:

# Disable wifi at 11pm and enable at 6am every day
0 23 * * * uci set wireless.@wifi-device[0].disabled=1; uci commit wireless; wifi
0 6 * * * uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi

 

then save (Ctrl+x followed by ‘y’ in nano // esc followed by :wq and enter in vi) and reboot the device. Done!