Apologies if this is a daft question but I’ve found nothing on it after a lot of searching (which might be more of a comment about my search skills ).
I login to my Windows server and start up my three CommandBox Lucee servers.
I then log out of the Windows machine (leaving it still running) but all of the Lucee servers get stopped.
I assume this is because they are running under the logged in account but I can’t see anything that even mentions it so I thought I’d ask before I go off and set them up to run as Windows Services.
I’ve watched Brad’s video on setting them up to run as services and he talks about doing it so they start next time the Windows server starts, but not as a solution to keep them running when logging out of the Windows machine.
Microsoft Windows Server 2016 Datacenter
Jeff, if you setup a service its primary purpose IS to run without you being logged in, so that nssm solution Brad uses in the video (or the windows sc command), or the new Ortus Service Manager can all set that up, and should suit your needs. Let us know how it goes.
More at Starting as a Service - CommandBox : CLI, Package Manager, REPL & More
Yes, I understand a service will do that (run while not logged in) but I just wanted to make sure that was the issue as it’s not mentioned anywhere* and I wasn’t ready to go and set up the service module if I had some other issue causing them to shut down.
Just a little mention; something like…
“Don’t forget, CommandBox servers created while logged in will shut down when you logout so look at running them as a service in Production or other environments if continued operation is needed.”
Anyway, thanks for the confirmation.
I had already bought the service module so now I get to go and set it up
* My humble apologies if this does exist and I simply haven’t read it.
I could see some quibbling that there’s nothing unique about Commandbox (the same would happen if cf or lucee were not started as a service).
But I can see how someone else could argue they simply thought Commandbox was a “different animal” (it surely is, in many wonderful ways) and might run across logouts.
So finally others would say that since the docs are open source, you could propose this additional info as a pull request. Discussion on that could continue there, as needed.
Let us know if that process may be new to you. It’s great when people who want to help others can be able to easily propose potential improvememts to the docs. That’s then a transferable skill to helping with the docs of other tools we use.
(No offense intended if you may already be well aware of making pull requests. I’m speaking then to others reading along, as it’s still quite common for some to NOT yet be comfortable with that process.)
I think the fact that I seem to be the first person to seek confirmation that this was indeed the expected behaviour (let’s face it, CommandBox is like magic to me so it could have done anything, potentially) and that this thread will serve as confirmation for any future overly cautious adopter, that’s probably enough. I’m a huge fan of keeping documentation concise.
That said, if there was a feeling it could be mentioned, I’d be happy to look at updating the docs.
No offense taken. I am indeed someone who has had minimal experience with pull requests having the great displeasure of working on my own for most of my career and not having done one for more than 5 years - I’d definitely consider myself ‘not comfortable’ with that process. I’ll go and read up on the process and look at making a Suggested Improvement.
Thanks again for your input. It’s very much appreciated.