Server restart and status check/restart script???

2 replies [Last post]
BROKEN
broken's picture
Offline
Joined: Feb 2009
Posts:

Does any one know of a script or cron function to automaticaly start a server when the system comes up and also to periodicaly check it is running then restart it if not, also to restart the server at a time interval ie. 1 day or 2 days. Running on windows.

Email & MSN

IMPULSE
korso's picture
Offline
Joined: Mar 2008
Posts:
Re: Server restart and status check/restart script???

well I'm not sure but maybe it help:

make some anyname.bat file in quake folder with next content:

@echo off
 
taskkill /IM quake.exe
 
start quake3.exe +set fs_game excessiveplus +set vm_game 0 +set dedicated 2 +exec server.cfg

this script must restart ur server and use program task shedule (windows component)

...Welcome to my world insect...

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: Server restart and status check/restart script???

you should set 2 scedules for the script above: starting your server when your computer starts up (or when you log on) and periodical schedule (in first case killing the task is not required because it's not running yet, but that's not a problem, taskkill just will write you a message like 'the process xxxxx.exe not found').
to do that, use at.exe command line program (shipped with windows since winxp) or control panel applet 'Scheduled tasks' (Control Panel->Scheduled tasks->Add scheduled task). so, you set first task to start when your system comes up, the second task - to run periodically (for example, every 2 days at 5:00 your local time). and don't forget to uncheck 'Stop the task if it's running for 72 hours' checkbox (just in case you want to increase period).
as for periodically checking if the server is running, dunno if windows' built-in programs give you such opportunity. you probably should use some monitoring software. google it Happy


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.