bottleneck
Choose style:

Author Topic: Scheduled Re-boot?  (Read 13006 times)

0 Members and 1 Guest are viewing this topic.

Offline akashk

  • Backer
  • *
  • Posts: 22
  • Thanks: 0
  • Registered : 12/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Scheduled Re-boot?
« on: July 23, 2014, 03:17:15 pm »
Is there an option to reboot the router on a schedule? A good old reboot once a week keeps the router running without problems!!

Offline pete

  • Moderator
  • *
  • Posts: 316
  • Thanks: 2
  • Registered : 22/07/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #1 on: July 23, 2014, 03:40:41 pm »
One way is to enable cron if its off via ssh.

Quote
/etc/init.d/cron start
/etc/init.d/cron enable

then add the reboot

Quote
0 5 * * * root /sbin/reboot
[img width= height= alt=" width="250" height="52" class="bbc_img resized]http://forum.securifi.com/Themes/Firox_multicolor_by_SMFSimple/images/logo.png[/img]
Pete
Lockport, IL  USA

Offline jmtenny

  • Backer
  • *
  • Posts: 11
  • Thanks: 0
  • Registered : 23/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #2 on: July 23, 2014, 03:58:19 pm »
Or if you prefer the GUI approach setup a Scheduled Task in the OpenWRT settings. Here are the steps:

1. Log into your router locally
2. Click Advanced
3. Click OpenWRT (you can skip to this step if you go directly to port 90 to start with, by default that is at http://10.0.0.254:90)
4. Log into the OpenWRT interface
5. Click System > Scheduled Tasks
6. Enter the following command in the Scheduled Task field

Code: [Select]
0 3 * * 1 reboot
7. Hit submit to save setting

Basically what the code is saying is every (0) minutes, (3rd) hour, (ignored) day of month, (ignored) month, (Monday - 1) day of the week - execute task "Reboot". If you want a different day or time or even task you can generate your Cron code here: http://www.webmaster-toolkit.com/cron-generator.shtml

Also a minor bug in OpenWRT as far as clearing out the Scheduled Task if you realize that you no longer want it. You need to delete the line of text, then in place of the text add Text return (hit enter) and then click submit. If you just delete the line and hit submit the Cron task is not overwritten and the Scheduled Task will continue to run.

Offline akashk

  • Backer
  • *
  • Posts: 22
  • Thanks: 0
  • Registered : 12/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #3 on: July 23, 2014, 04:10:13 pm »
@Pete/jmtenny - thank you both for the steps. Will try it out when I get back home.

Offline jmtenny

  • Backer
  • *
  • Posts: 11
  • Thanks: 0
  • Registered : 23/08/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #4 on: July 23, 2014, 04:39:08 pm »
No problem, I did a little further testing after reading Pete's post and realized that he was on to something that I overlooked. Apparently by default OpenWrt does not enable the cron service. So if you just follow the steps I provided it won't reboot (I tested to make sure). Because cron is not enabled as a service by default to start it and enable automatic startup during subsequent reboots, you need to execute the following commands when logged in via SSH as Pete indicated:

Code: [Select]
/etc/init.d/cron start
/etc/init.d/cron enable

What those 2 steps are doing is first starting the cron service once (again this does not change the startup configuration, so by itself will not be restarted automatically after a reboot). The second command changes the startup configuration (creates a symlink in /etc/rc.d) so that the cron service will be started during boot, but does not start it immediately.

Offline mwbelsaas

  • Backer
  • *
  • Posts: 14
  • Thanks: 0
  • Registered : 11/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #5 on: July 26, 2014, 09:26:05 pm »
Use a standard outlet timer to reboot it. That's what I've done. A bit easier to program.  :)

LGNilsson

  • Guest
Re: Scheduled Re-boot?
« Reply #6 on: July 26, 2014, 10:11:05 pm »
I had beta hardware running at home for well over 30 days without having to reboot it, so I think some of you guys might be a little bit paranoid here, just saying  ;)

Offline mwbelsaas

  • Backer
  • *
  • Posts: 14
  • Thanks: 0
  • Registered : 11/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #7 on: July 28, 2014, 10:54:32 am »
I think paranoid might be a strong phrase for what some of us non-dev unit owners are experiencing. My Almond+ loses internet connectivity often on both the 5 and 2.4 bands. So much so that I have installed an appliance timer in between the wall and the Almond+ to reboot it every four hours.

Offline akashk

  • Backer
  • *
  • Posts: 22
  • Thanks: 0
  • Registered : 12/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #8 on: July 28, 2014, 10:59:43 am »
I have a z-wave app module from my alarm co. I am using that to reboot my A+ once a day on a set timer. There have been occasions when I have needed to restart my A+. Having an app module (not linked to a home automation controller like Vera) helps since you can operate it independent of your home network. Saved me a few trips to the basement just to toggle my router on/off  8)

LGNilsson

  • Guest
Re: Scheduled Re-boot?
« Reply #9 on: July 28, 2014, 11:02:56 am »
Yeah, sorry about the problems with the Wi-Fi, that's something we'll solve one way or another.
The stability of the hardware is otherwise good though and I was sort of joking, hence the  ;)

Offline mwbelsaas

  • Backer
  • *
  • Posts: 14
  • Thanks: 0
  • Registered : 11/07/2014
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Re: Scheduled Re-boot?
« Reply #10 on: July 29, 2014, 08:47:09 am »
 :) understood and agreed. And I know you're working on the wifi.

 

Page created in 0.073 seconds with 20 queries.