Jump to content

Script to restart the server after a crash

Recommended Posts

Hello guys, im trying to find a script to restart my minecraft forge server after a crash and i already tried this but it doesnt work, if the server tries to restart it says Error: Unable to access jarfile server-1.18.2.jar

Here is the script i use : 

@echo OFF
java -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -Xms4G -Xmx4G -jar server-1.18.2.jar nogui
echo Press control+C to exit the server!
timeout 10
echo (%time%) Restarting!
goto loop



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.