Page 2 of 2

Re: CumulusMX Shutdown

Posted: Thu 06 Oct 2016 8:58 am
by Grimers
duke wrote:Not at all, RTFM!
Sorry, are you trying to make a point, because it isn't working. :lol:

Re: CumulusMX Shutdown

Posted: Thu 06 Oct 2016 1:59 pm
by freddie
Grimers wrote:Ctrl-C is just the Linux equivalent of close in Windows
Incorrect. Ctrl-C fires a SIGINT (the interrupt signal) in both Windows and Linux. MX will probably listen for this and perform an orderly shutdown when it is received. Close in Windows fires a (non-POSIX) SIGBREAK (the break signal). This is not the same as SIGINT. If MX listens for SIGBREAK in the same way as SIGINT it is possibly handled in the same way - but Steve would have to confirm this as he wrote the code :-). If MX doesn't listen for SIGBREAK then you will run the risk of data corruption, as program shutdown will not be orderly.
duke obviously knows his stuff, so I would err on the side of caution and RTFM as he suggests. The manual (i.e. Steve's MX operating instructions) says to use Ctrl-C, so I would advise doing that unless there is good reason not to.

Re: CumulusMX Shutdown

Posted: Fri 07 Oct 2016 8:35 am
by Grimers
Ok, thanks.

Re: CumulusMX Shutdown

Posted: Wed 12 Oct 2016 2:45 am
by Phil23
Ended up finding a lot of utilities have issues sending Ctrl-C to a command prompt box.
Particularly when it's run with administrative privileges.

Ended up finding Auto Hot Key worked for me. http://ahkscript.org/

Others might be able to refine the script a bit, but basically it activates the window titled C:\CumulusMX\CumulusMX.exe.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
WinActivate, C:\CumulusMX\CumulusMX.exe
Send ^c
Return
Liked the fact that AHK could compile the script into an EXE, so it doesn't need AHK installed on the host PC.

Then it's just scheduled to run at highest privileges with Windows own Task Scheduler.

Cheers

Phil

Might be something @Steve can refine or create an alternative to & include in the distribution.

CumulusShutdown.zip