How to set a timeout on a send method?
prp_at_home.com
Date: 04/02/04
- Next message: Scot: "text file reading"
- Previous message: Stivie S.: "RE: listing users and changing termserv properties"
- Next in thread: Bob Barrows [MVP]: "Re: How to set a timeout on a send method?"
- Reply: Bob Barrows [MVP]: "Re: How to set a timeout on a send method?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 02 Apr 2004 13:38:35 -0600
I have been looking all over for a way to time out a send method in
vbscript. I have a vbscript that checks the stats of a web page on a
server in my web farm and then act on that status. It will then sleep
for awile and check the status again. The problem is sometimes the OK
status will come back after about 5 minutes or so. I don't want the
script to wait that long to get the status. If it takes more than a
minute, I want the status to be in a fail state whether it comes back 5
minutes later or not. Basically, more than a minute is not acceptable.
How can I do that in vbscript. Here is bit of my code:
<snip>
dim oHTTP
set oHTTP = WScript.CreateObject("Microsoft.XMLHTTP")
oHTTP.open "GET", sSource, False
oHTTP.send
</snip>
It is oHTTP.send I want to set a timeout on. If it does not get a
response in one minute cancel the request and move on to the next
function in the code.
Thanks in advance to anyone that has any suggestions.
- Next message: Scot: "text file reading"
- Previous message: Stivie S.: "RE: listing users and changing termserv properties"
- Next in thread: Bob Barrows [MVP]: "Re: How to set a timeout on a send method?"
- Reply: Bob Barrows [MVP]: "Re: How to set a timeout on a send method?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|