Scheduled reboots?


#1

Morning Folks,

Is there any way to schedule a re-boot, i.e. monthly, with a stock IoTaWatt?

Yes, I know that Linux is SOoo much better than WinDoze but my experience over the past 15 odd years with BIG systems is that a re-boot really does clean up some random garbage. Not required but basic housekeeping.

I know I can just pull the power, but I would like for this to happen when nothing else is going on.

Mike


#2

The current firmware will restart every six weeks. The ESP has a 32 bit millisecond clock that is used for all timing. While all uses should survive a rollover of that clock, it’s impossible to comprehensively test that there will be no unintended consequences. Restarting, which costs all of a few seconds downtime, was a better way to insure no issues with clock rollover.

As you say, it has the additional benefit of cleaning up other things that may have occurred. I’ve not had my test systems actually go 42 days because I load new versions more often than that, but have had field systems that used the reboot. A message appears in the log:

Timeservices: Six week routine restart.


#3

Thanks for the reply. That period is perfectly acceptable for my interest.

Is thereboot time random or could it be set for some early morning time? If not now, in a future release.


#4

It’s not random. It’s exactly 42 days to the second from the last restart. I don’t see where there’s any advantage to scheduling this. It takes a couple of seconds.


#5

Thanks for explaining. Once again, the scientist in me is getting lost down the rabbit hole of the difference in theory and practice. In practice, as you said, a few seconds more or less will make no difference. In theory, those few seconds just as a uncommon large load is active can be significant in the analysis.

Your solution is certainly acceptable. Another example of where “Perfect” is the enemy of “Good enough”
Mike