TOMMY WANG
TOMMY WANG

Reputation: 1402

Need to write a batch file call a program in loop

The program is a c# console app, unfortunately for some unknown reason, it keep failing out every hour or so, when it fails, it will display the stacktrace then exits.

While fixing the bug, is there a way to write a quick batch file that just calls this program when it errors out and terminate itself? This will ensure we can still have this program running all the times.

Thanks.

Upvotes: 0

Views: 1964

Answers (1)

Mike Christensen
Mike Christensen

Reputation: 91598

You can create a BATCH file that will simply run your program over and over again. Something like:

@echo off
:start
YourProgram.exe
goto start

Upvotes: 1

Related Questions