Rebooting home router daily or at regularly intervals need not be a manually repetitive task. It can be automated so that it can reboot as per desired schedule without intervention.
To do this in Windows, there are 3 main steps :
- Installing a Telnet client
- Making a router reboot script
- Linking the reboot script using Windows Task Scheduler
(The script used here is tested using Windows 10 and D-Link router. The parameters for reboot schedule used are : daily at 7:05 pm).
Installing a Telnet client : This isn’t installed by default in Windows. To install it, go to Programs and Features and click on Turn Windows Features On or Off.
Next, drill down to Telnet Client, select it and click OK. Wait for the installation to complete.
Now that Telnet client is enabled, a router reboot script is needed.
Router reboot script :
Copy paste the below .vbs code in notepad, replace the router IP address, login username and password. Save this as a .vbs extension and as All Files.
'Open a Telnet connection to router IP'
'Delay of 4 seconds in between using the Sleep 4000 parameter when entering commands'
WshShell.run"telnet.exe 192.168.1.1"
WScript.Sleep 4000
'Provide username
WshShell.SendKeys"username"
WshShell.SendKeys("{Enter}")
WScript.Sleep 4000
'Provide user password
WshShell.SendKeys"password"
WshShell.SendKeys("{Enter}")
WScript.Sleep 4000
'Reboot the router
WshShell.SendKeys"reboot"
WshShell.SendKeys("{Enter}")
Before linking this script to Task Scheduler, it’s best to check if it does what is required.
Simply double click on it.
This will automatically open the Telnet window, connect to the router IP address with user credentials supplied and will reboot the router.
Adding the script to Windows Task Scheduler : Once it is working as needed, open Windows Task Scheduler. (Shortcut for this would be to open the Run box using Windows key + R and typing taskschd.msc).
Here, select Action > Create Basic Task.
Set a description as needed.
Choose a schedule for rebooting the router. Here it is configured to reboot daily at 19:05 hours.
Select the program to be launched for this created task. This will be the reboot script created before.
Finally, click Finish. The auto reboot task is created and the router script will be triggered automatically as per the set schedule.
All done.
By the way, there are some great deals on home routers at Amazon here.
Viva la automation! 🙂
it works great with a PROLiNK H5004NK ADSL Wireless Modem. Thanks!
Does not reboot the Netgear R8000 on a Windows 10 platform. Telnet window opens then runs through the commands with no apparent errors then closes but router does not reboot.
I need to get something automated to work as every day the ports assigned for my security dvr close and will not open unless the router is rebooted.
lol , it opens me the adobe reader ….
Great tutorial, thank you very much. I used it in my router which is a VDSL router (model Sagemcom 103), from STC in Saudi Arabia. The script works just fine, and I’m scheduling a daily reboot as I have a problem of loosing my telephone line every day, and I need to restart the router to get the line back.
Glad you found it useful! 🙂