- Joined
- Aug 31, 2009
- Messages
- 29
- Reaction score
- 4
Well I made a little batch file script that checks whether your server is online, if it isn't it will open it for you. Kinda like a server re-starter I guess.
Really all this does is checks if java.exe is open in your tasklist and if it isn't it will open your server, so hopefully you don't have any other program with java.exe in there which would stop the program from working properly.
Here's the script, copy and paste it to notepad and save into your server folder with the file extension .bat
*Remember to change "STARTER.bat" to what your server launcher is called.
Hope that this is useful to some people.
EDIT: If your too lazy to copy and paste or don't know how to here is a download link
Really all this does is checks if java.exe is open in your tasklist and if it isn't it will open your server, so hopefully you don't have any other program with java.exe in there which would stop the program from working properly.
Here's the script, copy and paste it to notepad and save into your server folder with the file extension .bat
PHP:
::Server Online Checker [SOC]
::Created by Slizard
@echo off
@title Server Online Checker
:MAIN
tasklist /FI "IMAGENAME eq java.exe" 2>NUL | find /I /N "java.exe">NUL
if "%ERRORLEVEL%"=="1" goto Server_Offline
:Server_Online
echo [Date:%date%] [Time:%time%] - Server is online.
goto END
:Server_Offline
echo [Date:%date%] [Time:%time%] - Server is offline, starting now...
start "STARTER.bat"
goto END
:END
ping -n 20 localhost > nul
goto MAIN
*Remember to change "STARTER.bat" to what your server launcher is called.
Hope that this is useful to some people.
EDIT: If your too lazy to copy and paste or don't know how to here is a download link
Code:
http://www.mediafire.com/?ztonwm0wnqm
Last edited:

