Scripting from a .bat file. I found the tool i was looking for on google, called wait.bat.
Thanks andrew