• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Server Restart Batch File
#1
When I was running AlterIW servers I had a bat file that would restart the server if it crashed or disconnected.

Now Im running legit MW3 servers and it's been so long I forgot what it was. Lost to time.

Can someone please remind me of what to do?

Is it better to use firedameon than a restart bat script?


Thanks.........
  Reply
#2
This is just off the top of my head:

Code:
@echo off

:restart

set %errorlevel%=0
start /NORMAL /WAIT "PATH_TO_FILE"
if not (%errorlevel%==0) goto errorend

goto restart

:errorend

echo An error occurred.
pause > nul
[Image: b_560_95_1.png]
  Reply
#3
Wow that was quick man. Thanks.

So how do I use the command line in this?

Like so?

@echo off

:restart

set %errorlevel%=0
start /NORMAL /WAIT "C:\HLDS\MIX\iw5mp_server.exe +set sv_config "server.cfg" +set dedicated 2 +set net_queryPort 28960 +set net_port 27015 +set net_authPort 8766 +set net_masterServerPort 27016 +start_map_rotate"
if not (%errorlevel%==0) goto errorend

goto restart

:errorend

echo An error occurred.
pause > nul

I cant get it to run it just brings up an empty dos box. I also just tried it like so

start /NORMAL /WAIT "C:\HLDS\MIX\iw5mp_server.exe"

Least I got the "NooB" part right in my screen name. lol
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 16,987 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 8,536 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 10,948 11-09-2013, 23:54
Last Post: Nerus
  Our Level Fastfile is Different from the Server. CheeseToast 6 10,556 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 5,562 11-02-2013, 14:16
Last Post: Casper
  MW3 Server Version superg1973 7 12,034 10-28-2013, 01:15
Last Post: kotyra972
  Help how to turn off map in dedicated server pero123 8 6,559 10-15-2013, 19:00
Last Post: Nekochan
  Issue with server addon and NAT dimitrifrom31 3 4,640 10-08-2013, 18:11
Last Post: iRoNinja
  GETTING SERVER ONLINE raym 6 5,266 09-28-2013, 22:42
Last Post: Nekochan
  advanced Server Config Poorya56 9 6,232 09-11-2013, 03:45
Last Post: trasto

Forum Jump:


Users browsing this thread: 1 Guest(s)