Server restart and status check/restart script???
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.
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)
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