View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 11, 2009 15:37 Post subject: Time Delayed Starting NWNX2.exe |
|
|
Does anyone have a template of a batch file, or something, that would allow for a time delayed execution/start up of nwnx.exe?
My scenario is pretty much that when my Server restarts, the mysql and php services have to start before NWNX, however, in all the cases of restarts so far, php,mysql and nwnx attempt to start at the same time, and of course, this means that the odbc plugin attempts to connect to mysql, before its been started.
Anyone know how to make nwnx2.exe start up, say after 1 minute delay, just to give the mysql server time to get started. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 11, 2009 17:02 Post subject: Neva Mind |
|
|
Got it sorted myself.
For anyone interested, the method ya go about this is to create a vbs file that reads.
I saved this as wait.vbs - in my c:\
Code: |
wscript.sleep 10000
|
Then a batch file that reads
Code: |
start /wait c:\wait.vbs
start start C:\Servers\NWN\NWNX2.exe
|
I save this batch file as nwnxwait.bat in my nwn folder. Then drag a shortcut of it into my startup folder.
Note - Change the values of the path to what your own path reads.
This results in a 10 second delay, before nwnx2.exe is started.
The main batch file that runs this, needs to be in the nwn folder, in order for the nwnx.ini to be read and used.
This 10 second delay, allows my server to now do automatic updates, restart, and bring mySQL back up, and then bring nwnx2 + NWNserver back up, without the risk of nwnx2 starting before mySQL has finished loading.
Problem Solved. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Thu Jun 11, 2009 21:24 Post subject: |
|
|
Windows also has the 'sleep' command built in, so you could use 'sleep 10' instead of the VBScript file. _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 11, 2009 21:27 Post subject: |
|
|
Lol
Might have gone with that idea.
But sure, 6 of 1, half dozen of the other.
They both work, no sense in changing it. Lol |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|