Page 1 of 1
trigger events
Posted: Sat Dec 05, 2015 12:30 pm
by 5243
Hi Oleg
Is this possible in one task in the trigger events tab:
check if task_01 runs longer for more than 2 minutes
then run task _02
If task_01 runs less less than 2 minutes
cyclic every 1 sec (this task)
Do you maybe have a simple example for me?
Thanks
Re: trigger events
Posted: Thu Dec 10, 2015 11:37 am
by Oleg
RoboTask has no possibility to check the running time of some task. I wrote this into our ToDo. Maybe we'll implement some actions/functions for this.
In any case triggers only launches the task, nothing more. You have to put any analysis in to the task body (on the "Actions" tab).
"Triggering events" tab contains only the list of attached triggers, no other algorithms.
Re: trigger events
Posted: Fri Dec 11, 2015 12:06 am
by 5243
thank you
Is it then possible to cyclic faster than 1 second?
Maybe a expression in expression monitor?
Re: trigger events
Posted: Fri Dec 11, 2015 10:46 am
by Oleg
No, the minimum interval is 1 sec. This is enough for most cases
But you can use the task body in the loop
for example use the
simple loop from 1 to 100
Re: trigger events
Posted: Fri Dec 18, 2015 2:55 pm
by 5243
Hi Oleg,
I have one more question about the trigger events.
Is it possible to write this type of expression in the expression monitor?
Trigger 20 times at random, between 10:00 hour and 14:00 hour
Re: trigger events
Posted: Tue Dec 22, 2015 3:27 pm
by Oleg
I'm afraid that you can't run the task randomly.
Expression monitor checks the expression one time per second.
If the value has been changed then the trigger launches the task.
I offer such algorithm:
- Create global variable RND (menu Options->Variables) with value 0.
- Use the task "random value" (see below) to change this value
- Attach to this task
Cyclic trigger (suppose every 10 sec)
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|2099193306
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task16"
Hide=INTEGER|0
ID=INTEGER|961060773
LogOnAsUser=INTEGER|1
Name=STRING|"random value"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action1\Params]
case=STRING|"0"
operator=STRING|"3"
type=STRING|"1"
value1=STRING|"{RandomValue(1000)}"
value2=STRING|"500"
[Actions\Action2]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""rnd"""
Params=FOLDER
[Actions\Action2\Params]
incement=STRING|"1"
vaiable=STRING|"rnd"
[Actions\Action3]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER
UnigueID=INTEGER|16445185
[Events\Event1\Params]
interval=STRING|"10"
notsatrtatactivation=STRING|"0"
So the value of variable RND can be changed (or not) every 10 sec.
Use your main task with
Expression Monitor trigger. Use the expression: {RND}
At last:
You have to enable the task "Random Value" at 10:00 and disable it in 14:00
You have to create additional tasks for this with
Scheduler trigger.
This is a little bit complex, but I'm afraid that it's impossible to make something simpler
Re: trigger events
Posted: Tue Dec 22, 2015 8:09 pm
by 5243
super!
completely clear!
thanks