Does tasker halt a task if the trigger is no longer active?

1,179 views
Skip to first unread message

Mike Boehm

unread,
Jul 17, 2013, 12:59:48 PM7/17/13
to tas...@googlegroups.com
So I have a profile setup so that when I plug in my phone it does some things.  Then when I unplug the phone, it waist 1 minutes and then does some other things.

If I unplug the phone, so it starts the Wait command, and then I plug the phone back in, does it then stop the exit task and go back to the start task or will it continue waiting the minute and then run the exist task even though the profile is active again?

Does that make sense?

Thanks.

Wes Stacey

unread,
Jul 17, 2013, 1:21:11 PM7/17/13
to tas...@googlegroups.com
yes it makes since.

And No, Tasker will not stop the task if the context goes inactive.

You can get around this by modifying your task, adding an if statement after the wait command and around the rest of the task, the if statement should be if %PACTIVE !~ *Profile Name* (keep the *'s around the profile name)

Then after the wait statement it will check to see if the profile is active again, then it will only perform the remaining actions if it hasn't gone active again.

Hope this helps,

-Wes

Matt R

unread,
Jul 17, 2013, 4:30:21 PM7/17/13
to tas...@googlegroups.com
I think you need to uncheck "enforce task order" in the profile properties too so the enter task doesn't have to wait for the exit task wait to finish.

Matt

Alex Peters

unread,
Jul 18, 2013, 2:44:58 AM7/18/13
to tas...@googlegroups.com
If you give the exit task a name, you can add an action to the entry task that stops the exit task.

Chandler N

unread,
Sep 10, 2015, 5:43:22 PM9/10/15
to Tasker
Will this work though? Won't the exit task have higher priority than the enter task and therefore finish completely before the enter task starts?

Rich D

unread,
Sep 10, 2015, 8:51:15 PM9/10/15
to Tasker Google Groups Post

> Will this work though?

Yes, if you de-select the enforce task order.

Won't the exit task have higher priority than the enter task  

Yes

and therefore finish completely before the enter task starts?

No, the priority system treats waits differently. When a wait is encountered in a task lower priority tasks are allowed to run.

Both of the above options will work if there is a wait in the exit task. However both of the above options will also let the enter task run again. Some times this not desirable.  I use a variation of both options to handle a wait in the exit task. It has the benefits of working with the standard default settings for enforce task order and it will not let the enter task run again when the profile goes active before the exit task wait is finished. Here is a example.

   Profile: Cell on
Context: cell near
Enter Task: Start
1. Enter task stuff

<put the following actions as the first actions in you exit task>

Exit task:stop
1. Wait 5 sec <whatever time you need>
2. Stop  <enter task> ;Start
3 Stop if %PACTIVE ~ *,Cell on,*
4. Rest of exit task

Reply all
Reply to author
Forward
0 new messages