File restart with tools db

jarjarbinque

New Member
Hello,

I set up a file with automatic restart file cleaning vehicles and recurrence thereof. The problem I have is the opening of a window to control and db_spawnvehicles db_utility but does not close automatically. Do you have a solution for these two windows closes every time?

Thank you in advance for your help.:)
 

Scrumbee

Member
If you’re talking about the db_utility.bat I made, it should close down as soon as it’s done running. Maybe you could explain some more maybe link a screenshot if that’s not the issue.
 

LimpDisc

Member
Edit the 2 .bat files to look like this. Problem solved.

Code:
perl db_spawn_vehicles.pl --instance 1 --host localhost --user dbusername --pass password --name dayz_overwatch --port 3306
exit
Code:
perl db_utility.pl --instance 1 --host localhost --user username --pass password --name dayz_overwatch --port 3306 --cleanup damaged
perl db_utility.pl --instance 1 --host localhost --user username --pass password --name dayz_overwatch --port 3306 --cleanup bounds
exit
 
this is the error i got
C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 OA>perl db_utility.pl --ins
tance 1 --host localhost --user root --pass ****** --name dayz_overwatch --por
t 3306 --cleanup bounds
Can't locate DBIx/Transaction.pm in @INC (@INC contains: C:/strawberry/perl/site
/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib .) at db_utility.pl li
ne 10.
BEGIN failed--compilation aborted at db_utility.pl line 10

Thats without the "exit" command
 

Husher

Member
Yes, you need Perl installed on the server, like Strawberry Perl http://strawberryperl.com/ for the db utilities to be able to talk to the database.

Code:
perl db_utility.pl --instance 1 --host localhost --user username --pass password --name dayz_overwatch --port 3306 --cleanup damaged
perl db_utility.pl --instance 1 --host localhost --user username --pass password --name dayz_overwatch --port 3306 --cleanup bounds
The two files call Perl first and compile/execute the script db_utility.pl which is a file thats written in Perl.
 

Husher

Member
The line in question is:
use DBIx::Transaction;

Make sure you've installed all of strawberry including the DBI functions (for database actions) and ensure you've updated the .bat files with your SQL username, password and database name?

It seems like DBI isn't installed correctly with Perl.
 

jarjarbinque

New Member
No, I do not have problems with using the script, but when I run my automatic restart, I have the command window using the Perl script that remains open.
 

jarjarbinque

New Member
Code:
timeout 5
:initialize
cd C:\Users\Dayz\Desktop\Serveur overwatch\tools
echo Starting db_utility ...
@start db_utility.bat
echo.
 
timeout 5
:initialize
cd C:\Users\Dayz\Desktop\Serveur overwatch\tools
echo Starting db_spawn vehicles ...
@start db_spawnvehicles.bat
echo.
I use this code to run two perl scripts, but he did something I should not put it to shut the windows after the execution.
 
Top