[BATCH] Start Worldserver or Authserver and pause on crash

I got tired of opening a command prompt, browsing to the build directory, and opening worldserver.exe if it disappeared after a crash, so this batch file will allow you to pause it and read the error.

Protip: Another quick way to run the worldserver using the command prompt is to SHIFT+Right Click anywhere inside the window and select "Open command window here". Then just type worldserver.exe and hit Enter. Doing it this way will serve the same purpose as the script below, and will also keep the window open if it crashes.

[ol][li]Copy/Paste the below code into a Notepad file (if you aren’t already, you should be using Notepad++)[/li]
[li]Save the files as “Worldserver restarter.bat” and “Authserver restarter.bat” (or whatever you prefer)[/li]
[li]Place the files in your BuildbinRelease folder (the same location where your worldserver and authserver binaries are stored)[/li]
[li]To use, simply double-click either batch file whenever you need to run worldserver/authserver.[/li]
[/ol]
Worldserver restarter.bat:



@ECHO OFF

CLS

ECHO Worldserver Restarter

:1

start "World Server" /B /MIN /WAIT worldserver.exe -c worldserver.conf

pause

goto 1


Authserver restarter.bat:



@ECHO OFF

CLS

ECHO Authserver Restarter

:1

start "Auth Server" /B /MIN /WAIT authserver.exe -c authserver.conf

pause

goto 1


Also, it might be useful to link this thread to people having a similar issue.

Don’t forget to √ Like this post if it helps!

thx +vote useful for me

im using this instead /emoticons/default_tongue.png

[CODE]@ECHO OFF

CLS

ECHO World Server Restarter

:1

start “World Server” /B /MIN /WAIT worldserver.exe -c worldserver.conf

pause

goto 1[/CODE]

I’ve decided I prefer yours instead. I like how it restarts the realm each time you hit any key so you can make quick changes to see if they fix the problem.

+1, and OP updated. Credit to Marcus.

The one I have used for many years is better, it restarts if the worldserver (same batch is used for auth server as well) crashes, but, ends the batch if there was no crash (normal exit)


@ECHO OFF

CLS

ECHO worldserver

:1

start "worldserver" /B /MIN /WAIT worldserver.exe -c worldserver.conf

if %errorlevel% == 0 goto end

goto 1

:end

I think the one above was likely made from mine back when I posted it on the old forums, but, the exit code part was probably removed because there used to be an error in worldserver.exe that caused a crash, even on a normal exit, which would have made it seem like that part wasn’t working correctly…

Yours restarts so quickly that I can’t read the error at all.

what if server freeze is this work

[CODE]@ECHO OFF

CLS

ECHO Worldserver Restarter

:1

start “World Server” /B /MIN /WAIT worldserver.exe -c worldserver.conf

pause

goto 1[/CODE]

or to use my old did not test it jet


@ECHO OFF

CLS

ECHO Trinity Started %time:~0,5% %date:~1%

:SERVERLOOP

worldserver.exe

ECHO Trinity Restarted %time:~0,5% %date:~1%

ECHO.

GOTO SERVERLOOP

:END

ERROR: Cannot connect to world database 127.0.0.1;3306;trinity;trinity;world

what do i need to do?

Error occured at:2012-03-25 01:56:54

Line no.:2

Error Code: 1146 - Table ‘world.version’ doesn’t exist

Query:

UPDATE version SET db_version=‘TDB 335.11.45’ LIMIT 1

Error occured at:2012-03-25 11:37:50

Line no.:2

Error Code: 1146 - Table ‘world.version’ doesn’t exist

you not have db world installed, or your login database in config worldserver is wrong, and check the name.

After the server crash appears message about debugging. JIT Debugger.
Visual Studio 2008
OS: Windows 7 x64
Microsoft Error message, I turned off in the control panel.
Fails turn off the message from the JIT Debugger: cleaned up the registry, switched off in settings VS 2008.
But as a result, only option disabled - “Debug Program”.
But still remains - “Close Program”.
Have to manually close the dialog message to reboot the server.
http://img571.imageshack.us/img571/7463/asdasdmzb.png

https://www.google.com/search?q=disable+JIT+dialog&ie=utf-8&oe=utf-8&aq=t

have restart script for linux?