Page 1 of 1

Command stop all tasks

Posted: Mon Jul 18, 2016 11:28 am
by Rukbunker
Hey there!

Is there a command to stop (or better: KILL) all tasks which are currently running at that moment? I can only define "This task", or another one, but not all running.

Re: Command stop all tasks

Posted: Mon Jul 18, 2016 1:02 pm
by Oleg
...or better: KILL...
This is a very bad idea

You can use the small script in VB Script action

Code: Select all

cnt = RoboTaskApp.TaskCount
for i=0 to cnt-1 step 1
  nam = RoboTaskApp.TaskInfoExtname(i)
  logmessage("Stop task " + nam)
  RoboTaskApp.StopTask(nam)
next
This script will stop all your tasks

Re: Command stop all tasks

Posted: Mon Jul 18, 2016 1:08 pm
by Oleg
It's better to turn automation off too. Because some tasks can be started automatically by its trigger

Re: Command stop all tasks

Posted: Wed Jul 20, 2016 9:06 am
by Rukbunker
I know it's dangerous. But in our case, it really saves some trouble! Thanks, it works.

Re: Command stop all tasks

Posted: Wed Jul 20, 2016 9:12 am
by Oleg
Now you can kill the task manually only

Re: Command stop all tasks

Posted: Wed Jul 20, 2016 10:13 am
by Rukbunker
Well, I have simulated the problem when Robotask should kick in and kill all the 3 tasks which are running at that moment. When the problem occured, Robotask killed all the 3 tasks immediately. As it should be. I am satisfied! :D