Jump to content
Violt

DayZ Server Start Bat + BEC Scheduler 4 Hour Restarts With warnings

Recommended Posts

To save beginners some time i decided to publish my start.bat and my scheduler.xml

STARTDAYZSERVER.bat (Restarts the server and BEC when it has crashed or restarted)

@Echo off
color 02

echo Do not close this window.

    Title DayZ Server 1 started at %time% - %date%
    echo.
    echo DayZ Server 1 started at %time% - %date%
    echo.
goto startup
:restart
    Title DayZ Server 1 restarted at %time% - %date%
    echo.
    echo DayZ Server 1 restarted at %time% - %date%
    echo.
:startup
	c:
	cd "C:DayZServer\BEC"
	start /min Bec.exe -f Config.cfg --dsc
	
	cd "C:\DayZServer\" 
    	start "" /HIGH /min /wait "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -profiles=E:\DayZProfiles\Admin1 -name=DayZ -scrAllowFileWrite -adminlog -freezecheck -noFilePatching -cpuCount=4 "-mod="
	c:\Windows\System32\timeout /t 20
goto restart

Scheduler.xml (4 hour restarts with multiple warnings)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Scheduler>

<job id='0'>
    <start>22:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='1'>
    <start>23:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='2'>
    <start>23:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='3'>
    <start>23:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='4'>
    <start>23:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='5'>
    <start>23:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='6'>
    <start>00:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='7'>
    <start>02:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='8'>
    <start>03:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='9'>
    <start>03:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='10'>
    <start>03:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='11'>
    <start>03:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='12'>
    <start>03:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='13'>
    <start>04:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='14'>
    <start>06:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='15'>
    <start>07:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='16'>
    <start>07:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='17'>
    <start>07:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='18'>
    <start>07:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='19'>
    <start>07:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='20'>
    <start>08:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='21'>
    <start>10:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='22'>
    <start>11:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='23'>
    <start>11:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='24'>
    <start>11:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='25'>
    <start>11:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='26'>
    <start>11:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='27'>
    <start>12:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='28'>
    <start>14:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='29'>
    <start>15:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='30'>
    <start>15:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='31'>
    <start>15:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='32'>
    <start>15:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='33'>
    <start>15:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='34'>
    <start>16:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='35'>
    <start>18:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 2 hours</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='36'>
    <start>19:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 hour</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='37'>
    <start>19:30:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 30 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='38'>
    <start>19:45:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 15 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='39'>
    <start>19:55:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 5 minutes</cmd>
    <cmdtype>0</cmdtype>
</job>

  <job id='40'>
    <start>19:59:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
     <cmd>say -1 Server restart in 1 minute</cmd>
    <cmdtype>0</cmdtype>
</job>

<job id='41'>
    <start>20:00:00</start>
    <day>1,2,3,4,5,6,7</day>
    <loop>0</loop>
	<runtime>000000</runtime>
    <cmd>#shutdown</cmd>
    <cmdtype>0</cmdtype>
</job>

</Scheduler>

 

Edited by Violt

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×