ConsoleApplication.Daemonize
From Xojo Documentation
Method
Converts the app from a regular console app to a daemon process that runs in the background on macOS or Linux.
Notes
Since daemonized console apps cannot be run from the IDE, you should build and test as a non-damonized console app and then daemonize it when you build. Use System.Log to handle debugging.
Although you can also use the Daemonize method on macOS, Apple would rather you use launchd to start daemon processes.
To create a background console application on Windows, you need to use ServiceApplication.
CGI web apps are already daemonized. Do not call this yourself in a CGI web app as it may cause connection issues. |
Sample Code
A typical use of the Daemonize method is as follows: