Hey guy's do u perhaps know how to program a addon that auto restarts ur server after like 6 hours and if the server crashes it restarts ?
Btw i dont care what program language
Just use Windows Task Scheduler?
Create a batch file that contains these values:
[CODE]
@echo off
taskkill /IM srcds.exe
C:\MyServer\srcds.exe -console -game garrysmod etc
[/CODE]
and make the Task Scheduler run it every 6 hours.
Its linux u know something for that
Use cron instead.
[CODE]
#!/bin/bash
pkill srcds_linux
./srcds_linux -console -game garrysmod etc
[/CODE]
Save it as restart.sh or whatever you want.
Then add it to crontab by running:
[CODE]
crontab -e
[/CODE]
And put this inside it:
[CODE]
0 */6 * * * /path/to/restart.sh
[/CODE]
Sorry, you need to Log In to post a reply to this thread.