ZyXEL C1000Z Scheduled Reboot – Windows

So there’s nowhere in its OS to schedule a reboot of ZyXEL’s C1000Z router.  Thankfully you can use Telnet to do it.

First, enable Telnet.  Log into the router, then choose Advanced Setup > Remote Console.  Under Console State choose LAN Telnet Enabled.  Set your Telnet username and password and click Apply.

Now you’re ready to go.  Create a .vbs file and populate it with the below, changing the IP address, username and password to be applicable to your router.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet"
WScript.Sleep 3000
oShell.Sendkeys "open 192.168.1.1~"
WScript.Sleep 3000
oShell.Sendkeys "admin~"
WScript.Sleep 3000
oShell.Sendkeys "password~"
WScript.Sleep 3000
oShell.Sendkeys "reboot~"
WScript.Sleep 3000
oShell.Sendkeys "~"
WScript.Sleep 3000
oShell.Sendkeys "quit~"
Wscript.Quit

Save this file.  You can double click it to test it.  After having confirmed it works, create a task pointed to it in Windows Task Scheduler.  Modern Windows OSes should natively run a vb script in scheduler.  If not, use CScript to launch the script:

1
C:\Windows\System32\CScript.exe //Nologo //B X:\PathToYourScript\YourScript.vbs

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">