to put my questions in context: i have a server-type program that i want to stay running on my computer. lately, it has been crashing unexpectedly when no one is around to restart it, but i need it to be running at all times.

what i need is help doing the following:

1. checking to see if the program is running
2. running the program if its not

can anyone give me a quick example of how to do this, or point me in the right direction on how to find it?