ThinManager has two different watchdogs that will monitor your applications and force the terminal to reset it's session if the application closes or hangs.
If the Application Locks up but stays alive, use the TermMon ActiveX Control Method
If the Application Exits but the session remains, use the Script Method
TermMon ActiveX Control Method
The TermMon ActiveX has a watchdog function built into it. If you register the TermMon ActiveX and embed it into your program you can use the WatchdogTime function to kill all locked up session.
You set the watchdog to a number, say 10, and reset it every time the watchdog hits a lower number, say 3.
As long as the application is functioning properly it will keep setting the watchdog. If it locks up it is unable to update the watchdog, the watchdog counts down to zero, and then will kill the session. Once the session is killed the thin client will automatically reconnect and start a new session with the application running.
For further information, see the TermMon ActiveX Page.
The Watchdog script will start a specific application, and upon the application's termination, it will force ThinManager to re-establish the connection. This script is primarily designed for applications that will randomly quit but have spawned other processes that are running in the background and preventing the session from restarting. A common example is that view.exe will spawn hd.exe and alarmgr.exe and have them running in the background. If view.exe dies, hd.exe and alarmgr.exe will still be running and Thin Manager cannot restart a terminal session that has running processes.
- Create a .bat file that contains the following code:
start "" /wait "Path\to\Program\executable.exe" shutdown /f /l
start "" /wait "Path\to\Program\executable.exe" -a -b -c arguments shutdown /f /l
- Setup ThinManager to launch the .bat file instead of the regular executable.
- Restart thin client (if thin client is currently running)