httprequest timeout?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

httprequest timeout?

Post by Dorian (MJT support) » Tue Aug 31, 2004 9:05 am

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.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Aug 31, 2004 3:34 pm

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!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Aug 31, 2004 3:40 pm

You asked:
i'd like to set a timeout value, then if the value is blank i can send an alert.
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=0
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!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Tue Aug 31, 2004 8:10 pm

thanks Bob, I'll give that approach a try.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts