[SOLVED] kill tasks in restart.bat for server restart?

Quarterbreed

Well-Known Member
so I configured my restart.bat to kill MySQL,BEC and my server, im just wondering if having the kill command for cmd.exe(MySQL) will cause my DB not save current players/vehicles info.

just asking cause I think it rolled back my DB or my server crashed not sure.. ill find out in 1hr at server restart if it does it again
 
the procees i use on my servers is:

1. global message to users on 10, 5 and 1 minute before
2. use BERCon #shutdown to shutdown the server it posible this crash but it will not have any rollback
3. kill arma2oa.exe
4. start again arma2oa.exe with the parameters you need

mysql can keep running it's no necesary to killhim, or do you mean Hive Log cmd window?
 
msyql.exe serves the database software you don't need to kill him, if you want to respawn vehicles you must call
db_spawn_vehicles.pl
https://github.com/ayan4m1/DayZ-Private/blob/master/db_spawn_vehicles.pl

so de entire procedure must be:

1. global message to users on 10, 5 and 1 minute before
2. use BERCon #shutdown to shutdown the server it posible this crash but it will not have any rollback
3. kill arma2oaserver.exe
4. call db_spawn_vehicles.pl with the correct params
5. start again arma2oa.exe with the parameters you need
 
Im not using bliss im using stapos lite pack for dayz+, seems the only way i can get vehicles to respawn after being blown up. When i killed just bec and the server, vehicles wouldnt respawn after being blown up on restart, sry im new to this
 
Im not using bliss im using stapos lite pack for dayz+, seems the only way i can get vehicles to respawn after being blown up. When i killed just bec and the server, vehicles wouldnt respawn after being blown up on restart, sry im new to this

MY BAD! sorry!

the process must be:

1. global message to users on 10, 5 and 1 minute before
2. use BERCon #shutdown to shutdown the server it posible this crash but it will not have any rollback
3. kill arma2oaserver.exe dont kill the mysqld it's not necesary
4. make a bat put in the root folder of the game and call ir start_after_restart.bat and include this

Code:
.\MySQL\bin\mysql --user=root --password=root --host=127.0.0.1 --port=3306 --database=hivemind --execute="call pMain()"
start .\Expansion\beta\arma2oaserver.exe -port=2302 -mod=@dayz;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig

the pMain() store procedure will call the necesary to spawn the vehicles


IF you reboot you operative system then you must start the server with
https://github.com/Stapo/DayZ-Private-Server-Lite/blob/master/Start Server.bat
 
this is what im using atm
Code:
:: kill the server and bec..
taskkill /im arma2oaserver.exe
taskkill /im bec.exe
taskkill /im cmd.exe
 
timeout 8
 
:: start the server..
set dayzpath="C:\ArmA 2"
cd /d %dayzpath%
start StartServer.bat
 
timeout 30
cls
@exit

I used the same process b4, but I didn't have taskkill /im cmd.exe and instead of startserver.bat
I used this
Code:
@echo off
echo.
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig
echo.
echo Starting BEC
start C:\ServerToolsNam\dayzbec.bat
echo.
start
exit

was just wondering why vehicles wasn't respawning when I used the code above, that's why im currently using the first code up top
 
Code:
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig

use the absolute path but probably you will have problem with the space between Arma and the 2 number

Code:
start C:\Arma 2\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig
 
Code:
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig

use the absolute path but probably you will have problem with the space between Arma and the 2 number

Code:
start C:\Arma 2\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig

it seems to be working find.. when BEC gives warnings 30,15,10,5,1 and then executes the cmd for restart.bat it shuts down MySQL,BEC and server then starts the server with the startserver.bat, I was just wondering why vehicles wasn't respawning in after being blown up with out using the killtask for MySQL(cmd.exe)
 
it seems to be working find.. when BEC gives warnings 30,15,10,5,1 and then executes the cmd for restart.bat it shuts down MySQL,BEC and server then starts the server with the startserver.bat, I was just wondering why vehicles wasn't respawning in after being blown up with out using the killtask for MySQL(cmd.exe)


include this before call arma2oaserver.eze make sure to check twice the values of the params!

Code:
.\MySQL\bin\mysql --user=root --password=root --host=127.0.0.1 --port=3306 --database=hivemind --execute="call pMain()"
 
include this before call arma2oaserver.eze make sure to check twice the values of the params!

Code:
.\MySQL\bin\mysql --user=root --password=root --host=127.0.0.1 --port=3306 --database=hivemind --execute="call pMain()"
that line is in my start server.bat :D
 
ok, but is that line that you must call BEFORE start arma2oaserver in order to respawn vehicles
 
yup this is my startserver.bat
Code:
@echo off
start /D.\MySQL\ MySQL.bat
.\MySQL\bin\mysql --user=root --password=xxxxx --host=127.0.0.1 --port=3326 --database=hivemind --execute="call pMain()"
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig
echo.
echo Starting BEC
start C:\ServerToolsNam\dayzbec.bat
echo.
exit
 
yup this is my startserver.bat
Code:
@echo off
start /D.\MySQL\ MySQL.bat
.\MySQL\bin\mysql --user=root --password=xxxxx --host=127.0.0.1 --port=3326 --database=hivemind --execute="call pMain()"
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig
echo.
echo Starting BEC
start C:\ServerToolsNam\dayzbec.bat
echo.
exit

oops didnt see this thread. :)

as Zedar pointed out, there is no need to kill the mySql proccess..

From the way Zedar said, your gunna want to have your Start Server.bat looking something like this:
Code:
@echo off
.\MySQL\bin\mysql --user=root --password=xxxxx --host=127.0.0.1 --port=3326 --database=hivemind --execute="call pMain()"
start .\Expansion\beta\arma2oaserver.exe -port=2314 -mod=@dayz+;@hive -name=DayZ -config=DayZConfig\ServerSettings.cfg -cfg=DayZConfig\Arma2Config.cfg -profiles=DayZConfig
echo.
echo Starting BEC
start C:\ServerToolsNam\dayzbec.bat
echo.
exit
 
restart.bat stapo, the start.bat must include the msyql.bat to start the mysql demon wich is mysqld.exe
 
yes but you said that we dont want to shutdown the mysql server as there is no need.
thats correct, once the mysqld is up there is no need to shutdown/restart it on every gameserver restart. you need only the call to de pMain store procedure
 
I just started a new server.. I was just wondering since Im using taskkill for server "A" will it end up closing server "B"?

thx for reading
 
Back
Top