Feb 17, 2016 · 2 min read

Automating certain tasks on your LEDE/OpenWRT device can help keep things running smoothly.

In this example we are going to show you how to use Cron to disable your WiFi at 11:30pm, and reboot at 6:30am.

SSH to your LEDE/OpenWRT device

If you are using Windows then start PuTTY and click Session on the left side, select SSH from the options, and then enter in the IP Address of your LEDE/OpenWRT box into the Host Name field.

Once you’ve done this just click on Open to start up the SSH connection.


If you are connecting via terminal, then just SSH to your LEDE/OpenWRT device using the following command, where is your LEDE/OpenWRT device’s IP address.

ssh root@

Setting up your timezone

First you’re going to need to make sure you have your timezone set up correctly on your device.

Run the following command:

vi /etc/config/system

You should see something like the following, where UTC is the default timezone:

config ‘system’ 
option ‘hostname’ ‘OpenWrt’
option ‘timezone’ ‘UTC’

Replace UTC with the respective timezone code for your desired timezone. You can find a list of all the supported timezones here.

Creating your Cron

By default Cron is not enabled, so first up you need to change this.

Run the following command to enable Cron:

/etc/init.d/cron enable

Now that Cron is enabled, run the following command to edit the cron config:

crontab -e

Now enter in the following:

30 23 * * * wifi down
30 06 * * * reboot

The first line runs wifi down at 23:30 every day, which disables the WiFi.

The second line runs a reboot at 6:30 every day, which reboots the device to clear used memory which in turn brings the WiFi back up again.

You can find more information on different time combinations on the OpenWRT Wiki here.

Finally we just need to start the cron process, which we can do by entering the following command:

/etc/init.d/cron start

If you found this post helpful please let us know by clicking the ♥ below.

This blog was brought to you by Cucumber Wi-Fi. Cucumber helps you run a more efficient Wi-Fi network. Check it out here.

Cucumber Wi-Fi — control any (Wi-Fi) device from the cloud.

LEDE/OpenWrt & IoT

Tutorials based on LEDE/OpenWrt from CT WiFi


Written by


An orchestration tool for WiFi devices — Manage your networks from a single-pane of glass.

LEDE/OpenWrt & IoT

Tutorials based on LEDE/OpenWrt from CT WiFi

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade