VBScript does not wait for prompt and ends prematurely
Good day.
I wrote a script that's supposed to start different types of servers with a 3 minute pause between two different server types. The script, however, does not wait for the '$' prompt (line 83) before heading straight into the crt.Sleep command (line 85) and eventually finishes prematurely. In this case, the vmType is a 'icsf' and the script commences from line 43 (sleep) to line 80 (ElseIf vmType = "icsf"). Below is my script and it has some MsgBox comments: Code:
'#$language = "VBScript" Regards, Bjoern |
Hi BjoernH,
It is unlikely that the WaitForString is simply not waiting, or being skipped, it is likely finding the "$" elsewhere in the output. Is it possible that the output of the preceding command contains a "$" somewhere in the output? |
Quote:
Code:
'Declare - nova stop or start So what happens is the following, once it displays the start time, it jumps to the "Sleeping for 3 minutes" MsgBox. It sits there for 3 minutes and then it outputs the first command with the acceptance plus the next 'nova start' command. It's suppose to wait for 3 minutes between the two 'nova start' commands. I recorded the session, so if you want, I can email you the video and the script. Regards, Bjoern |
Hi BjoernH,
I think a timestamped log file of the script running will likely be the biggest help. I've included a link below to a video that helps demonstrate configuring SecureCRT to create a log file with time stamps. SecureCRT Log File Name Substitution ParametersDO NOT POST YOUR LOG FILE IN THE FORUMS After creating a log file that demonstrates the issue please send it via email to Support@VanDyke.com with "Attn: Eric Forum Post 13393" in the subject line. Please be sure to attach the file rather than pasting the contents directly into the email. |
All times are GMT -6. The time now is 08:41 PM. |