Posts: 25
Threads: 9
Joined: Nov 2019
Reputation:
2
Hi,
Is it possible to perform a unit reboot from within a script.
i.e. a scheduled reboot every 3 weeks?
Brent
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
Why do you want to reboot periodically?
Posts: 4659
Threads: 24
Joined: Aug 2017
Reputation:
212
This command will reboot the controller. Make sure you don't create infinite reboot loop.
Add some delay before the command in scheduler script to make sure it won't run again after reboot.
Code:
os.execute("reboot")
Normally this is not needed.
------------------------------
Ctrl+F5
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
19.08.2020, 17:20
(This post was last modified: 19.08.2020, 17:32 by Erwin van der Zwart.)
Hi Daniel,
Will this “os” command also force a save to the SD card?
If not you will end up with gaps in your trending.
As you stated: The system is designed for 24/7 operation so reboots are not needed..
FYI: I installed a LM2 - yeah believe it or not (: - in our office (behind a UPS) in 2013 and it has never rebooted sinds then and still running like a charm with quite some scripting, so this is a reliable benchmark if you ask me (:
It’s also never upgraded and i don’t think i will ever do that, so let’s see if it runs another 7 years (:
If Petr reads this i suspect i have a HW3 suprise soon (:
BR,
Erwin
Posts: 4659
Threads: 24
Joined: Aug 2017
Reputation:
212
Hi Erwin
Yes it does save, it's like you would press the button in the interface.
BR
------------------------------
Ctrl+F5