Cyclic triggering event

Discuss RoboTask here
Post Reply
tcarvalho
Posts: 25
Joined: Mon Feb 24, 2020 5:46 pm

Cyclic triggering event

Post by tcarvalho »

Is there a way to have the cyclic triggering event stop after successfully completing a task X number of times?

For example if I want my task to complete 100 times automatically (so not having to manually run the task each time) and then stop after successful number of completions; is that possible to script via the current tools provided? If not then I'll post this as a suggestion to incorporate setting a completion counter for the cyclic trigger specifically.

Thanks all!
Oleg
Site Admin
Posts: 3010
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Cyclic triggering event

Post by Oleg »

You can make some global counter. When the counter will be greater than 100 you can disable the task.
After your steps put Increment variable action to increment the counter
Use Disable Task action
When you disable the task RoboTask stops all triggers of the task and the task can be running manually only.

Algorithm will be similar to this:

Code: Select all

....
Do something
....
Increment variable MyCounter
if {MyCounter} > 100 then
   disable task (this task)
end if
Of course variable MyCounter must be global variable and set it to 0 before you start cyclic trigger
Oleg Yershov
Post Reply