This script when started will run continuously in loop mode. Script checks for a process as defined in script configuration and takes actions based on the process status.
I wrote this script when I was given a task to monitor a process continuously to ensure it was running. This script will start the process if it's not running; kill it and restarts it if it's hung.
If you also have such kind of tasks in your job profile just download my script and configure it as per your needs
appname: put a fancy name of your app here
exename: put name of the executable here
exepath: put path of the executable here
timeout: after how many seconds should the script check for process status
This script is not suitable if your application runs in multi-process mode.