Periodically reboot dd-wrt
Solution 1
dd-wrt has a scheduled reboot feature built into the firmware. Have a look at Administration >> Keep Alive >> Scheduled Reboot. Make sure cron is turned on at Administration >> Management >> Cron.
Solution 2
[if scheduled reboot does not work]
If you have enabled ssh-server on (I don't use dd-wrt, not sure if its enabled by default), you can reboot using following command
ssh [email protected] reboot
You can look at this page to configure SSH public-private keys, so that you don't have to login everytime. And remember you should be running ssh-agent/putty-agent whereever your login from.
http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line#SSH
On Linux use cron to schedule reboot, and windows use Windows-Scheduler to execute command using putty.
Solution 3
I have a Linksys WRT-54GL running DD-WRT and have the same requirement. I've found that the scheduled reboot doesn't work so put a timer on the power outlet. Get a digital one so you can set the downtime to be 1 minute at midnight and you have a scheduled reboot.
Related videos on Youtube
Phuong Nguyen
Updated on September 17, 2022Comments
-
Phuong Nguyen over 1 year
I have a Linksys Router with dd-wrt installed on. Due to some problems, I would like to periodically reboot the router (let's say at 0:00 everyday). How would I do that?
-
Paul Hoffman over 14 yearsHuh? Which timers have settings where you can turn something off then on quickly? This is a modem we're talking about: he wants it turned on immediately after it is turned off.
-
Dan over 14 yearsDigital timers, like you use the schedule lamps going on and off in your house to make it look like you're at home generally can be set to a resolution of a minute or two. A reboot cycle takes about a minute from power off to serving internet again anyway so a 2 min disruption at 3am isn't going to be too much trouble. I've heard of UPSs that have a similar feature.
-
Wesley over 14 yearsI saw chatter on the web about scheduled reboot not working, but the entry for that bug in dd-wrt's Trac site was closed as having been fixed. Do you have the latest version?
-
amphetamachine about 13 yearsA lot of the smaller DD-WRT builds don't support SSH--only telnet, but it's the same basic principle.
-
Admin almost 9 yearsIn addition to Alex Toombs' answer, you can also add cron job in your router's web administration: Administration - Management tab - Additional Cron Jobs field: insert
00 00 * * * root reboot
(or in my case0 3 * * 4 root reboot
so it reboots every Thursday 3:00 am). -
palswim almost 5 yearsThis allows weekly reboots, but doesn't work if you want to schedule less frequently. And the seconds field doesn't allow input greater than
99999
, so it also doesn't really work for less frequency than weekly. -
Admin almost 5 yearsTo clarify, this shell command (
nvram set cron_jobs=...
) and the field in the Administration interface set the same variable.