1
Solved

While loop in tasks stops working after a while

Hello!

I have this profile set up:

STATE -> Variable Value ~ 1

Task:

A loop in which every 5 seconds it should do a http request and check whether or not it should open an app. This includes a Wait of 5 sec and a Goto 1 after the loop ended.

This works for a while, however after 2 hours (http request no longer required the app to open), it stops working (http request now requires it to). It's just like the profile and task never existed.

I have another profile which works fine, so Tasker isn't killed. I even installed Caffeine to have the screen open 24/7 and the profile still stops. All battery optimisations are off.

3 replies

L

Still looking for an answer ?

Maybe another task conflicts (kills or pauses) this task.

Is the 2 hours you reported a precise number ?

I don't know about Tasker, but in science computing in general, we have hardware and software interrupts that serve to escape a loop. Maybe there's one here.

V

It never does, I checked from my PC. In the interval of one hour it should've succeded at least once. Once I entered in Tasker and manually pressed Play from the relevant task, only then it executed.

Sure, but maybe the phone couldn't reach the pc at the time?

Maybe the HTTP Request is failing sometimes?

Topic is closed for comments