On 7/30/2018 8:33 AM, Duane via Interest wrote:
I need to keep a desktop application running on a server. I can detect that it's running but what's the best way to restart it using Qt? This will mostly run on Windows and I expect issues running the service as admin and starting the application as logged on user.
Since it will mostly be Windows, does it need to be a Windows service? Or even involve Qt at all? Why not create a Task Scheduler entry to monitor the desktop application at intervals (say 10 seconds), and restart it when it stops?(hint: This is one of the ways that Microsoft keeps its automatic update system service running constantly under Windows 10) Instead of a Windows service, you could simply make the Qt program a stand-alone console app that the Task Scheduler launches to perform the monitoring.
I would imagine other platforms (OS X, Linux) have similar scheduling mechanisms. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest