We have a web application available via a URL of which Genero forms a part, so I would be monitoring "https://<url>/cefinance/wa/r/webappshtml5/<filename.xcf>" or similar pages, using say, a Web Service event monitor, that runs, say, every minute to check the page is accessible and as the page loads, it starts a session in Genero and because the monitor does not press the exit button like a user would do, it leaves the session open and next minute opens another session and each session holds down one user license for a period of time, the application gets killed very fast depending on how fast your web service monitor works.
In that case I would consider modifying your program so that it exits nicely if a certain argument is passed e.g.
IF base.Application.getArgument(1) = "monitor" THEN
MENU ""
ON ACTION accept
EXIT MENU
ON IDLE 1
EXIT PROGRAM 0
END MENU
END IF
and have your monitoring tool start with that argument e.g.
https://<url>/cefinance/wa/r/webappshtml5/<filename.xcf>?Arg=monitor
I would suggest putting the additional code somewhere after the initial connection to the database and just before the first UI interaction.
Reuben