Home > coding > Schedule wireless availability using ddwrt

Schedule wireless availability using ddwrt

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
Advertisements
Categories: coding Tags: , , ,
  1. Massimo
    January 3, 2018 at 05:00

    Very interesting, but I would like to restrict access to my son’s smartphone in selected times of day. Do you think it is possibile?

  2. Massimo
    January 4, 2018 at 12:52

    Looks good, I will give it a try! Thanks so much!

    • January 4, 2018 at 13:54

      You are welcome. Good luck! :)

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: