Automate IE to try to reconnect if web server is down
Moderators: Dorian (MJT support), JRL
Automate IE to try to reconnect if web server is down
I am a newbie, just started trying this nice product that i think would do the job for me. I conect to a web application using IE6.0 to pull information from Intranet web server and refresh every 5 seconds. My requierment is that if the server is down or the network is down I need this product to detect it and dispaly a default page , and retry every Interval of time , till server is restored or the link is up, then reconnect to the original page. If some body can help i realy appreciate it
I just cut this out of a script that I had done a while ago. This is scheduled to run every 5 minutes and just pops up a status message. Intended to send multi emails when server was down.
Need to insert IP address to ping.
Output of PING goes to a file.
Find parses out the line with the ping results
ReadLine gets the number of failures. If 0=OK, if 4=NG, if 1-3=Retry.
================================
WIN9X = use command.com
WINNT/XP/2K = use com
If doing Cut/Paste from forum be sure to remove any Trailing Space Characters.
Need to insert IP address to ping.
Output of PING goes to a file.
Find parses out the line with the ping results
ReadLine gets the number of failures. If 0=OK, if 4=NG, if 1-3=Retry.
================================
Comments for Run Program> commands:/Need to test email server and verify it is active.
Let>RP_WAIT=1
Let>CF_OVERWRITE=1
Let>RP_WINDOWMODE=0
Let>IP=127.000.000.001
Label>Start
Message>Running PING to Email Server now....
Run Program>command.com /c ping %IP% > c:\temp\tstmail1.txt
Message>Checking Results of Email Server status now....
Run Program>command.com /c find /c "timed out" c:\temp\tstmail1.txt >c:\temp\tstmail2.txt
ReadLn>c:\temp\tstmail2.txt,2,countline
Position>:,%countline%,30,start
Add>Start,30
MidStr>%countline%,%start%,2,count
Label>Test1
//Note, need different email account to send these messages if this email server is down!.
If>%count%=4,NoMail,Test2
Label>Test2
If>%count%=0,Good,Start
Label>Good
Message>Email server is OK
//If good send OK mail, once every six hours
Goto>End
Label>NoMail
Message>Email server is DOWN
//If no good, send warning emails to tech support and group
Label>End
WIN9X = use command.com
WINNT/XP/2K = use com
If doing Cut/Paste from forum be sure to remove any Trailing Space Characters.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Previous posting with script for testing email was from me. Sorry, thought I was logged in. I am repeating it here to make it easier for me to locate in the future.
================================
I just cut this out of a script that I had done a while ago. This is scheduled to run every 5 minutes and just pops up a status message. Intended to send multi emails when server was down.
Need to insert IP address to ping.
Output of PING goes to a file.
Find parses out the line with the ping results.
ReadLine gets the number of failures. If 0=OK, if 4=NG, if 1-3=Retry.
=============================
WIN9X = use command.com
WINNT/XP/2K = use com
If doing Cut/Paste from forum be sure to remove any Trailing Space Characters.
================================
I just cut this out of a script that I had done a while ago. This is scheduled to run every 5 minutes and just pops up a status message. Intended to send multi emails when server was down.
Need to insert IP address to ping.
Output of PING goes to a file.
Find parses out the line with the ping results.
ReadLine gets the number of failures. If 0=OK, if 4=NG, if 1-3=Retry.
=============================
Comments for Run Program>commands:/Need to test email server and verify it is active.
Let>RP_WAIT=1
Let>CF_OVERWRITE=1
Let>RP_WINDOWMODE=0
Let>IP=127.000.000.001
Label>Start
Message>Running PING to Email Server now....
Run Program>command.com /c ping %IP% > c:\temp\tstmail1.txt
Message>Checking Results of Email Server status now....
Run Program>command.com /c find /c "timed out" c:\temp\tstmail1.txt >c:\temp\tstmail2.txt
ReadLn>c:\temp\tstmail2.txt,2,countline
Position>:,%countline%,30,start
Add>Start,30
MidStr>%countline%,%start%,2,count
Label>Test1
//Note, need different email account to send these messages if this email server is down.
If>%count%=4,NoMail,Test2
Label>Test2
If>%count%=0,Good,Start
Label>Good
Message>Email server is OK
//If good send OK mail, once every six hours
Goto>End
Label>NoMail
Message>Email server is DOWN
//If no good, send warning emails to tech support and group
Label>End
WIN9X = use command.com
WINNT/XP/2K = use com
If doing Cut/Paste from forum be sure to remove any Trailing Space Characters.
Last edited by Bob Hansen on Tue Jun 08, 2004 7:13 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!