Page 1 of 1

Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 5:14 pm
by oldeflyer
Hello,
Just installed Cumulus MX and it and the local Webserver are working.
I don't have a computer that I can use as a 24/7 machine. My home computer does the hibernate/sleep thing according to the power plan.
I have searched for 'hibernate' and 'Cumulus MX' and only found Version 1 references and the threads just ended without a resolution.

During my experiments with this I had missing data that I recovered by using the backup files (per the Wiki) and restarting MX.
That got rid of my data gaps but I need an automated way to force the MX to read the Davis Pro 2 logger automatically, or to pick up where it left off.

So, is there a way to have MX stop and restart from where it left off after Windows hibernates?

Wayne

Re: Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 6:34 pm
by The PIT
you should be able to create either a batch file or powershell script to close it on a shedule.

Re: Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 7:35 pm
by oldeflyer
Poking around on the Wiki I found a section on installing the MX as a service.
That worked. It also said that if a sleep/hibernation occurred it would stop the service.
Good so far.
It gave a reference to a PowerShell file CreateCmxResumeFromStandbyTask.ps1 that is supposed to create a task in the Scheduler that will restart MX on resume.
Script will not run as it says it is unsigned?
I can read the script but I don't know what most of it means. I used to work with mainframes, not PCs ;)

Re: Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 7:54 pm
by mcrossley
I do not have a public code signing certificate so my scripts are unsigned.

You can run unsigned scripts by using the command line...

Code: Select all

powershell.exe -ExecutionPolicy Bypass -File C:\CreateCmxResumeFromStandbyTask.ps1
You will need to run the CreateCmxResumeFromStandbyTask.ps1 script from an administrative command prompt (run as Administrator).

Re: Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 8:03 pm
by oldeflyer
Windows has a document that discusses changing a policy scope and type. Used that to allow me to run the script.
There is now a task in the Scheduler to restart MX on resume.
Will test and log results so the process can be documented for future searches.

Re: Windows 10 Cumulus MX and hiberantion

Posted: Tue 29 Mar 2022 8:52 pm
by oldeflyer
mcrossley,
Our posts crossed paths :)
I just used the policy scope of process so nothing was changed permanently.
It appears that this method works!! :D :D
I have set a short hibernation time and have run through several iterations and lost zero data.

Thanks for the Program help.
Wayne