How to keep a service running?
Author: email@example.com (byjones)
I have an application which starts a userver process on a server to run every minute (using utimer to control this).
However, when my 'launcher' application quits, I need this service to keep running every minute.
Currently, as soon as it quits, the service goes through the Cleanup operation and no longer runs.
The service is set as Self Contained and Detached.
How can I make this service continue functioning?
Ideally, I want to be able to stop/start it running from my client, but then leave it functioning behind the scenes, and re-launch my client to monitor it if required. If the server reboots for whatever reason, upon reboot, I want my service to continue in whatever state it was prior to the reboot, without the need to login to the server to manually start this process (I think I can achieve this with a batch file to run on system startup).