Page 1 of 1
Getting started.
Posted: Tue May 04, 2004 3:26 pm
by Grumpa
I know this must be easy, and I am missing something very simple. I want to ping a site (
www.google.com) every 10 minutes. If successful keep the loop going, if not run a program (.exe) ... all I get is Socket Error ... Task is Aborted ... Task Executed Abnormally. I run the task, and then fail the internet to see if the .exe runs. I've modified the Ping and Text Loop Demo to do the task ... help?
Thank you.
Getting started.
Posted: Tue May 04, 2004 3:51 pm
by BrianSmith
Are you running RoboTask 2.0.3?
I was getting this error on an earlier version of RoboTask.
I also noticed that when I try to run this task from my computer at work that it always times out as they have a restriction on the firewall to block "PING". Not sure of the technical issues with this but you may also want to check that you can ping from a command-line prompt and get a successful response as well.
Getting started.
Posted: Tue May 04, 2004 5:37 pm
by Grumpa
Ping works fine until I intentionally drop my connection. Then the .exe won't start. Version is 2.03.
Getting started.
Posted: Tue May 04, 2004 6:56 pm
by BrianSmith
I may be asking dumb questions here but can you check that the line that runs the .exe file is getting called. Add a dialog box just before the command that runs the .exe file.
Have you tried performing a different task when ping fails other then running your .exe file to see if the problem is related to the .exe file itself or the fact that the RoboTask is failing to call your next task when ping fails.
Maybe you could export your task and post it on the forum so that I could try running it myself to see if it works.
Obviously I would have to call my .exe file but at least I could test the rest of the RoboTask for you.
Getting started.
Posted: Tue May 04, 2004 7:56 pm
by Grumpa
Here is the modified (and simple) Taks:
;********************
; RoboTask Task file
; Do not edit!
;********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|644553860
Events=FOLDER
ExternalName=STRING|"Task35"
Hide=INTEGER|0
ID=INTEGER|283321411
Name=STRING|"Ping and Text Loop Demo"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|2
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action1\Params]
destvar=STRING|"CURRENTSITE"
file=STRING|"Sites.txt"
line0=STRING|"google.com"
linecount=STRING|"1"
sourcetext=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_INET_PING"
Enabled=INTEGER|-1
Name=STRING|"Ping {CURRENTSITE}"
Params=FOLDER
[Actions\Action2\Params]
default=STRING|"-1"
host=STRING|"{CURRENTSITE}"
timeout=STRING|"20000"
variable=STRING|"R_TIME"
[Actions\Action3]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"1"
value1=STRING|"{R_TIME}"
value2=STRING|"-1"
[Actions\Action4]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action4\Params]
message=STRING|"Ping of ""{CURRENTSITE}"" is {R_TIME} msec"
type=STRING|"1"
[Actions\Action5]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action6]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action6\Params]
message=STRING|"""{CURRENTSITE}"" does not respond"
type=STRING|"2"
[Actions\Action7]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""REGCLEAN.EXE"""
Params=FOLDER
[Actions\Action7\Params]
program=STRING|"C:\Utility\REGCLEAN.EXE"
runas=STRING|"0"
wait=STRING|"0"
workdir=STRING|"C:\Utility"
[Actions\Action8]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action9]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER
[Events\Event1\Params]
id=STRING|"C45QFY65"
interval=STRING|"20"
Getting started.
Posted: Tue May 04, 2004 8:54 pm
by Grumpa
Maybe I should say what I am trying to do.
Every 10 minutes ping a host. If the host is ok no action. If the host/server/internet is "down" then run an .exe (reboot a DSL modem) ... wait 2 minutes until the modem reboots, and resume - if the ping is ok, send an email saying service was restored. restart the loop.
Thanks for the assistance.
Getting started.
Posted: Tue May 04, 2004 10:04 pm
by BrianSmith
Ok. I finally understand the error which I can also replicate now. The actual ping task seem to produce a socket error when I unplug my network connection from my computer. So I guess what the guys at RoboTask need to do is create a task we can use to detect a network/internet connection before atempting the ping command or build a fail-over mechanism for the ping task if no internet connection is available.
Getting started.
Posted: Wed May 05, 2004 6:00 am
by Grumpa
Thank you for verifying the problem ... you have saved me a lot of time and frustration ...