Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
Dillwhop

Auto Server restart bat

Recommended Posts

Hey all!

figured I would post my auto restart bat file. This is the same one i use for arma 3 just modified for DayZ. Remember to change any paths necessary and remove or change cpucount to your specs.

This bat file will restart the server if it ever shuts down or crashes.

@echo off
color 0a
title DayZ SA Server
C:\Windows\System32\mode con cols=50 lines=3 >nul
set /a var=0
:start
echo Running Server
start "" /wait /realtime /affinity F "DayZServer_x64" "-config=serverDZ.cfg" "-cpuCount=8" -port=2306
set /a var+=1
cls
echo Server has shutdown %var% times, restarting
goto start

 

Edited by Gibson.D

Share this post


Link to post
Share on other sites

Will post my startup batch file to.
offcourse adjust the filepaths

@Echo off
    Title Dayz Server started @ %time% - %date%
    echo.
    echo Dayz Server started @ %time% - %date%
    echo.
goto startup
:restart
    Title Dayz Server restarted @ %time% - %date%
    echo.
    echo Dayz Server restarted @ %time% - %date%
    echo.
:startup
    DayZServer_x64.exe -config=serverDZ.cfg -profiles=C:\server\DayZServer -BEpath=C:\server\DayZServer\battleye -freezecheck -noFilePatching -cpuCount=8
goto restart

 

Edited by kaspar rave

Share this post


Link to post
Share on other sites

Here's mine 

@echo off
c:
:start
c:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | c:\Windows\System32\find /I /N "dayz.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo DayZ Server is starting now
c:
cd "C:\Workfolder\DayZServer\" 
start "" /HIGH /min /wait "C:\Workfolder\DayZServer\DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -profiles=C:\Workfolder\DayZServer\AdminProfile\Admin -dologs -adminlog -netlog -freezecheck -noFilePatching -cpuCount=4
echo Server started succesfully
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
c:\Windows\System32\timeout /t 60
c:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64" 2>NUL | c:\Windows\System32\find /I /N "DayZ.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
c:\Windows\System32\taskkill /im DayZServer_x64
goto start

 

Share this post


Link to post
Share on other sites

guys could you please help me out with a restart bat file i want to make my server reboot every 3 hours with ingame messages to warn players here is the bat file i use to start my server if you could please mod  it for me thanks

 @echo off
    cls
    
    set version=1.0
    set wat=Dayz SA

    title %wat% Watchdog

    cd C:\DayZServer
    
    :watchdog
    echo (%time%) %wat% started.
    start "Dayz_SA" /wait /affinity FF /high "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -dologs -BEPath=C:\DayZServer\Battleye
    echo (%time%) %wat% closed or crashed, restarting.
    goto watchdog  

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×