hi guys,
is there a way to set the httprequest timeout value? i have an httprequest macro which check if my server is up. if the server isn't responding, the httprequest seems to hang there for eternity. then %HTMLResponse% seems to be blank which of course causes an error in the script if it ever manages to continue.
i'd like to set a timeout value, then if the value is blank i can send an alert.
httprequest timeout?
Moderators: JRL, Dorian (MJT support)
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Removed content since my following posting replaced this one.
Last edited by Bob Hansen on Wed Sep 01, 2004 8:18 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You asked:
Let>Timeout=300
Label>Start
HTTPRequest>..............HTMLResponse
Length>HTMLResponse,FileLength
If>%FileLength%>0,OK
Add>Counter,10
Wait>10
If%Counter%HTTP has not worked in the past %Timeout% seconds.
Goto>End
Label>OK
...
...
Label>End[/quote]NOTE: Sample script above is untested.
You could try something like this: Make a timeout variable. Make a loop to do HTTP GET, check the length/content of the result. If not what expected, increase counter by 10, WAIT>10. If counter Counter=0i'd like to set a timeout value, then if the value is blank i can send an alert.
Let>Timeout=300
Label>Start
HTTPRequest>..............HTMLResponse
Length>HTMLResponse,FileLength
If>%FileLength%>0,OK
Add>Counter,10
Wait>10
If%Counter%HTTP has not worked in the past %Timeout% seconds.
Goto>End
Label>OK
...
...
Label>End[/quote]NOTE: Sample script above is untested.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am