Skip to content
Riot Bits

Riot Bits

  • Home
  • News
  • Guides
  • Video Guides
  • Patch Notes
  • Report Abuse
  • Toggle search form

SCP: 5K – Automatic Restart After Server Crash

Posted on 06/24/2023 By [LOKE]YourC3PH No Comments on SCP: 5K – Automatic Restart After Server Crash
  • Title: SCP: 5K
  • Release Date:
  • Developer:
  • Publisher:
Information about SCP: 5K is still incomplete. Please help us fill the details of the game using this contact form.

Considering the instability introduced by the latest game patch, I have encountered numerous problems while hosting my server. It unexpectedly crashes without any clear cause, and I have also heard similar complaints from other users. Consequently, I have developed a quick batch script that automatically checks if the server is running and restarts it after a short delay of just 5 seconds.

Setting up the Script

If you are facing the same issues and wish to resolve them, the challenge lies in starting the server using a separate batch file, which makes it difficult to utilize Watchdog/Supervisor applications that handle such tasks. Fortunately, I have devised a simple batch script that allows you to restart your server immediately after a crash, with the option to adjust the delay (“x”) as per your preference.

To configure an automatically restarting server, follow the steps below:

  1. Create a new .bat file in the directory of your server. You can name it anything since the specific name is not important.
  2. Copy and paste the following code into the file:
@echo off
:A
Set "MyProcess=PandemicServer.exe"
set MAP=(ENTER MAP NAME HERE, CHECK FOR DEFAULTS BELOW)
set PORT=(ENTER SERVER PORT HERE, CHECK FOR DEFAULTS BELOW)
set QUERYPORT=(ENTER QUERY PORT HERE, CHECK FOR DEFAULTS BELOW)
set "SERVERNAME=(ENTER NAME OF YOUR SERVER HERE)"
set MAXPLAYERS=(ENTER MAXIMUM AMOUNT OF PLAYERS HERE)

title "%MAP%"
start "" WindowsServer/PandemicServer.exe %MAP% -log -servername="%SERVERNAME%" -SteamServerName="%SERVERNAME%" -port=%PORT% -queryport=%QUERYPORT% -maxplayers=%MAXPLAYERS% -force_steamclient_link
goto B

:B
tasklist | find /i "%MyProcess%">nul || goto A
TIMEOUT /T 5
goto B
  1. Save the file and execute it. It is crucial to adjust the values accordingly; otherwise, your server will fail to start!

Default values:

MAP=Area12_PersistentLevel
PORT=7777
QUERYPORT=27015

The value

"SERVERNAME"

and

MAXPLAYERS

Lastly, if you wish to modify the interval at which the watchdog checks if the server is running or not, you can adjust the value as per your preference.

TIMEOUT /T x

(where “x” represents the desired number of seconds to wait), and save the file.

That's everything we are sharing today for this SCP: 5K guide. This guide was originally created and written by [LOKE]YourC3PH. In case we fail to update this guide, you can find the latest update by following this link.

If you believe that any of the content on this site violates your rights, including your intellectual property rights, please contact us immediately using our contact form.
Guides Tags:SCP: 5K

Post navigation

Previous Post: How to Fix SCP: 5K FPS Drop, Lag, and Stuttering Issues
Next Post: How to Fix Nova Lands Crashing, Crash at Launch, and Freezing Issues

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Title: SCP: 5K
  • Release Date:
  • Developer:
  • Publisher:
Information about SCP: 5K is still incomplete. Please help us fill the details of the game using this contact form.

Disclaimer

All content cited is derived from their respective sources. If you think we have used your content without permission, make sure to reach us and we will be taking it seriously.
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms of Service

Copyright © 2025 Riot Bits.

Powered by PressBook News WordPress theme