Sometimes I have problems ending my internet use in time to get enough quality sleep.
So I decided to set up a schedule that automatically disables our wireless home network during certain night hours for “nights before work/school day” and slightly longer hours for “night before weekend day”. Luckily this is quite easily done with the ddwrt firmware that I run on my router.
I couldn’t use the “Radio Time Restrictions” feature under Wireless – Advanced Settings, because it only supports one uniform schedule for all days of the week. Instead I used ddwrt’s cron support and the wl command.
I configured the following entries under Administration – Management – Cron. This turns on the wireless every morning at 6am, shuts it down at 10:30pm on Sunday to Thursday and shuts it down at 11:45pm on Friday and Saturday:
00 06 * * * root wl radio on 30 22 * * 0-4 root wl radio off 45 23 * * 5-6 root wl radio off