I need a source code that will check if the application that my program launched by SHELL command is still running. My program is a scheduler, two applications can run at the same time and what I need is to check if both these applications are still running. I tried a code which I got from a book that checks one application at a time, this does not suit my program because it inhibits the running of other scheduled applications.
Ex. App1 - should run at 11:00AM
App2 - should run at 11:01AM
Launch App1 at 11:00AM then a loop that will check if it still running. App1 is still running at 11:01AM but my program sees that App2 should be run at 11:01AM thus it will run App2 at 11:01AM. Then the program should check if these two applications are still running.
I hope someone can help me.