Just run it. It checks every 30 seconds if the Server is running. If it crashes the Script will automaticly restart the server.
This is nothing special, but maybe useful for some dedicated server hoster.
You can edit the code with Notepad (i recommend Visual Studio Code or Notepad++) to make sure the directory of the install folder is the same.
I used the default directory.
Just run it. It checks every 30 seconds if the Server is running. If it crashes the Script will automaticly restart the server.