title: How to automatically run command line program several times?
body: <p>I have a c# program, integrated with a command line program. I want to run the command line program twice(start, finish, start again, finish again). Now I use a timer to set a special time period for every run, for example, give first run 10 seconds, no matter it is finished or not, after 10 seconds, the program starts the second run.</p>
  
  <p>I want the second run can run automatically after the fist run finshed, How to do it? How to detect the first run is finished, and then take a trigger to start the second run?</p>