AutoRestart Batch File For TTT

Hello I need script or program to restart my TTT server in case it crashes or stops working. This could be the server stopping because it stopped working or something is frozen and actually closes the whole program.

Here’s my start.bat to run my server.

@echo off
echo Protecting srcds from crashes...
echo If you want to close srcds, close the srcds window and type Y depending on your language followed by Enter.
title Server Watchdog
echo (%time%) srcds started.
start /wait srcds.exe -console -game garrysmod +map ttt_mw2_terminal +maxplayers 24 +gamemode terrortown -authkey ************* +host_workshop_collection *******
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

A batch file won’t check to see if the server is online, it will only check if the server window is open.
If you’re talking about a full fledged server monitor, you may have to write your own.

How about a batch file that can attempt to run the server every x minutes and if its running it will try again in x minutes.