1
Solved

Enter / Exit tasks not in sequence.

I've noticed that since the last upgrade(s), there's a problem with the sequence of the enter/exit tasks.

I wondered why some of my profiles didn't work exactly as they used to work and suspected some tasks not to be performed or performed more then once.

To check this i added counters to each enter and exit tasks on the profiles which gave a problem. These counters count one up each time a task is executed.

This confirmed my assumption that sometime the enter tasks where performed but that the exit tasks never where executed when the profile was deactivated and that the next time the profile would get active again, the enter task was again performed.

I always assumed that when a profile gets active, the enter task would perform and that when it gets deactived the exit task would perfrom even when the enter task hasn't finish entirely. This seems not the case anymore since one of the last updates.

3 replies

Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance

L

Variables:

Enter: to see how many times this Enter task has been executed

Exit: to see how many times this Enter task has been executed

COUNT: adds or subtract each time Location Services have been enabled/disabled in this Profile

LOCKSERV: adds or subtract each time Location Services have been enables in this and other Profiles who set/reset Location Services.

Wait statements are there to slow down things bit, sometimes variable values not set or Power Toggles not updated if no wait time was set.

    Profile: Cell Near Home (94)
    Restore: no Notification: no
    State: Cell Near [ Cell Tower / Last Signal:GSM:251.34631 / 0
    GSM:252.95049 / 0
    GSM:251.34611 / 4
    GSM:252.31028 / 3
    GSM:252.2568500 / 0
    GSM:252.2568520 / 1 Ignore Cells:* ]
    Enter: Loc Serv Enable (95)
    A1: Variable Add [ Name:%Enter Value:1 Wrap Around:0 ] Rem: testcounter to see how many times this Enter task has been executed
    A2: If [ %COUNT eq 0 ]
    A3: Secure Settings [ Configuration:Location Services Enabled Timeout (Seconds):0 ]
    A4: Wait [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ]
    A5: Variable Add [ Name:%COUNT Value:1 Wrap Around:0 ]
    A6: If [ %LOCSERV < 0 ]
    A7: Variable Set [ Name:%LOCSERV To:0 Recurse Variables:Off Do Maths:Off Append:Off ]
    A8: End If
    A9: Wait [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ]
    A10: Variable Add [ Name:%LOCSERV Value:1 Wrap Around:0 ]
    A11: Wait [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ]
    A12: Variable Set [ Name:%CELLHOME To:1 Recurse Variables:Off Do Maths:Off Append:Off ]
    A13: End If
    A14: WiFi [ Set:On ]
    A15: Variable Set [ Name:%WifiOn To:1 Recurse Variables:Off Do Maths:Off Append:Off ]
    A16: Wait [ MS:500 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A17: Refresh PowerToggles [ Configuration:Refresh PowerToggles Timeout (Seconds):0 ]
   
    Exit: Loc Serv Disable (96)
    A1: Variable Add [ Name:%Exit Value:1 Wrap Around:0 ] Rem: testcounter to see how many times this Exit task has been executed
    A2: If [ %COUNT > 1 | %COUNT eq 1 ]
    A3: Variable Subtract [ Name:%COUNT Value:1 Wrap Around:0 ]
    A4: Wait [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ]
    A5: Variable Subtract [ Name:%LOCSERV Value:1 Wrap Around:0 ]
    A6: Wait [ MS:100 Seconds:0 Minutes:0 Hours:0 Days:0 ]
    A7: If [ %LOCSERV eq 0 ]
    A8: Secure Settings [ Configuration:Location Services Disabled Timeout (Seconds):0 ]
    A9: End If
    A10: End If
    A11: Variable Set [ Name:%CELLHOME To:0 Recurse Variables:Off Do Maths:Off Append:Off ]
    A12: Wait [ MS:500 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A13: Refresh PowerToggles [ Configuration:Refresh PowerToggles Timeout (Seconds):0 ]

L

Must says that it seems to be working OK again after a complete wipe and re-install of Tasker.

Topic is closed for comments