We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$loop = 1; while ($loop) { $process = Start-Process "myBot.exe" -Wait -NoNewWindow -PassThru switch ($process.ExitCode) { 0 {"Restarting..."; Start-Sleep -s 3} 1 {"Exiting."; $loop = 0;} default {"Unhandled Exit Code, Exiting."; $loop = 0} } } # In your bot, you can use Environment.Exit(0) to restart, or Environment.Exit(1) to kill.
Action the above into the script.
This may also help close #23
The text was updated successfully, but these errors were encountered:
Auto restart
Sorry, something went wrong.
No branches or pull requests
Action the above into the script.
This may also help close #23
The text was updated successfully, but these errors were encountered: