Implement easy reboot schedule


I think it would be helpful to add easy reboot scheduler option on the System > Reboot tab. So you don't have to set up commands all the time. I use it on all of my devices and i believe most of other users too.

1 Like

Without dismissing your request, are we allowed to ask why you want/need to reboot all your devices on a schedule?

I honestly don't think so.


I meant this for home and office use. I'm talking about weekly/monthly reboots to avoid stability or performance issues that may rise up over time.

why not cron it ?

1 Like

This really should not be necessary and I would consider any hardware/ software needing this to be broken and in need of replacing.


From my experience as ISP service technician. Most of my problems are solved by a simple reboot. Talking both about endpoint routers for 20$ and ptp wireless devices worth around 3000$.
Just a precaution on my part in regards to my experience.

it's just a convenience thing. so people who don't have the experience with command lines can do it simply in the gui without googling the commands.

Since the consensus is rebooting is not something that should be encouraged and given there is a way to schedule practically anything, including a reboot, it is better that only the truly motivated take the effort and learn how to do it.


My devices usually have uptimes of several months to well over a year and are rebooted only for kernel upgrades. The only device that really needs a reboot every once in a while is the cable modem - the only device not powered by free software.

But that's not the actual topic: You just need to paste a one-liner into the LuCI input box at "System" -> "Scheduled Tasks".


While I fully agree with the thought, this one (as a user of OpenWRT) feels like casting a stone within a house that I can’t (and don’t want to) replace. :slight_smile:

I have 3 Xiaomi AX6S devices (dumb APs) and a Xiaomi AX3600 (router + AP + + DAWN + WireGuard + VPN Client). All these devices OOM or get dangerously close within 2-3 weeks max.

I have setup for my brother-in-law 3 dumb APs of different hw makeup: A Xiaomi AC2100, a Netgear R6700, and a TPLink C2600. The AC2100 has limited memory, so goes down after a week, the Netgear fairs ~3 weeks, and the TPLink tends to go the longest (over 6 weeks).

All this to say that “somewhere” in the software suite and official (above) addons, there IS a need to reboot to automatically keep things running.

I also agree with a script suffices and I’ve done that. Sharing below for anyone who may need…. This is based on running “low” on memory:

#Create script to check if lower than 5% of memory available.  If yes, reboot before it gets bad. /tmp/sys_mem_check is added to cron jobs to run.
cat << "EOF" > /tmp/
MEM_TOTAL="$(ubus call system info \
| jsonfilter -e "$['memory']['total']")"
MEM_AVAIL="$(ubus call system info \
| jsonfilter -e "$['memory']['available']")"
MEM_LIM=$(awk -vn=$MEM_TOTAL -vm=$MIN_DECIMAL_PERCENT_ALLOWED 'BEGIN{printf("%.0f\n",n*m)}')
if [ "${MEM_AVAIL}" -lt "${MEM_LIM}" ] \
|| ! pgrep uhttpd > /dev/null
then reboot
logger -t /tmp/ "Memory check completed with $MEM_AVAIL available (Total Mem: $MEM_TOTAL -- Min Allowed: $MEM_LIM)"
exit 0
chmod +x /tmp/

To expand on this point: Regular reboots mask problems. WPNTFIIWDKIB

1 Like

You should indeed be able to expect that your OpenWrt device just keeps running for months or even years without showing problems. The only reasons for reboots 'should' be:

  • blown fuse
  • moving furniture around and having to unplug the device in the process
  • replacing the device with a newer generation one
  • security upgrades (this typically implies a reboot every 2-3 months)
  • fundamental configuration changes (and in that case more just to test that everything is in order, than a technical need to apply the new configuration)

Pretty much everything else would hint at deeper issues that would need solving, instead of papering over.

I realize that ath10k and ath11k on systems with little RAM might run out of bounds, but I still don't see a scheduled reboot fixing that - on the one hand the RAM likely goes low pretty quickly under some circumstances, so a daily reboot won't help you, on the other hand these issues need fixing as well (either in the driver source or at least mitigated by reducing RAM usage (or taking the cheap route out and getting a system with sufficient amounts of RAM - or non-ath10k/ath11k/ath12k) on the device in question, as in not making it do other things that need considerable amounts of RAM).

Personally, I'm a bit on the experimental side and like upgrading to new main snapshots every 4-8 weeks on average, but that's just me - not a need for the devices to get a reboot just in case. I've also already had uptimes close to a year, before -literally- a blown fuse ended that. I'm not against rebooting at all, if there's a reason for that (security upgrades) and I'm certainly not an uptime fetishist - but I really consider anything that needs regular reboots for stability reasons to be broken.


if you want to set it up "all the time" why not simply click the reboot button ?

My old router lasted for 7 years before the power source died. but according to your logic i should have thrown it away when i first experienced stability issues which was like 6 months after i bought it. which to me feels like a complete waste. back then i set up reboot scheduler for once a week reboots and i haven't had any problems with the router since. only time i had to interact with it were firmware updates.

The philosophy of OpenWRT seems to me. that it is to keep the devices in use as long as possible to reduce e-waste as much as possible. not to throw away devices whenever a minor inconvenience appears.

It's just a creature comfort to have it on the... now very empty... reboot screen and to use the cron menu for more complex scheduled tasks. I'm not saying that its the most needed update.. and that the programmers should focus on it... it's just a suggestion. I'm just saying that it would be nice and convenient way to go about it.

I should also explain that this is just for basic home router used at a small house

The fact of the matter is, no system should ever crash without a solid reason. Either there is a hardware issue, insufficient RAM or some broken software (drivers), either of those would need (debugging and-) fixing. A router that is crashing regularly is just broken and untenable, especially these days where increasingly 'everything' depends on internet connectivity, from phone (VoIP/ SIP, WiFi-calling), TV (call it streaming), IoT and smarthome, etc.

It is not normal for an OpenWrt router to crash, you should be able to expect uptimes in excess of a year (but you should sysupgrade for new security fixes regularly, which tends to put a natural end on uptime records). If not, there is something broken and in need of fixing.

Yes a crash once in a blue moon can always happen, but somewhat regular crashes are another topic altogether.


Technically script is an amulet default vm.min_free... will prevent script from ever triggering on <512MB RAM devices.