View Single Post
  #7  
Old 07-29-2017, 05:24 PM
Fridgecritter
Hill Giant
 
Join Date: Feb 2008
Posts: 188
Default

I figured it out with the help of timeout /t [5 seconds]

AND the most important thing after taking the "exit" off the end of my batch file, I could see why it was not starting the server back up. For perl to find world.exe, etc... the batch file has to be ran from the EQEmuServer folder because in the perl file it doesn't pass a specific directory argument. It was running from desktop before.

So for other people's information, here's what my end result looks like in a batch file:

Code:
taskkill /IM perl.exe /F
taskkill /IM queryserv.exe /F
taskkill /IM ucs.exe /F
taskkill /IM eqlaunch.exe /F
taskkill /IM Zone.exe /F
taskkill /IM world.exe /F
taskkill /IM shared_memory.exe /F
taskkill /IM loginserver.exe /F

timeout /t 3

mysql --user=root --password=mypass peq < c:\query1.sql

timeout /t 5

mysql --user=root --password=mypass peq < c:\query2.sql

timeout /t 5

@echo off
cls
echo *** CLEARING OLD LOGS ***
del "logs/zone/" /q
shared_memory.exe
start perl C:\EQEmuServer\win_server_launcher.pl zones="30" zone_background_start kill_all_on_start
exit
So now all I have to do is create 4 tasks, one for every 6 hours, and it will run that each time. Tested and it works. Thanks a ton Scorpious.
Reply With Quote