Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
[Help] Profile triggering, task efficiency, and collision handling (via variable states)
Post Flair (click to view more posts with a particular flair)
Author Summary
pxlprsnatr is in help
Post Body

I prefer using variables for triggering everything in Tasker as this makes it easier for me to keep track of active profiles and whatnot. So instead of, for eaxmple, triggering my entire @Home profile directly by being connected to my home SSID, I have a separate profile set a %Home variable to true upon connection and activate everything else based on said variable's state (with "Restore Settings" disabled and accompanying exit tasks to reset them).

This has generally worked for me but, on a few occasions, some tasks would get stuck somewhere and cut out or there'd be a variable left unmodified and it would screw with everything. It would usually happen when the phone boots and all the tasks run for the first time. So instead of fiddling with task priorities, I decided to write a master Boot profile with one task that would take care of everything, regardless of what state any of the variables were in prior to the phone shutting down.

The task is as follows:

:START
    Variable Set %BootSequence = busy
    Variable Set %BootFlagsSet = false
    If %BootFlagsSet ~ false & %BootSequence ~ busy (
        Perform Task "Set Boot Flags"
        Goto CheckTaskerPrefs
    ) Else (
        Goto START )
    End If
:CheckTaskerPrefs
    If %TaskerPrefsReset ~ true (
        Goto CheckVars
    ) Else (
        Perform Task "Reset Tasker Prefs"
        Goto CheckTaskerPrefs )
    End If
:CheckVars
    If %VariablesReset ~ true (
        Goto END
    ) Else (
        Perform Task "Reset Variables"
        Goto CheckVars )
    End If
:END
Variable Set %BootSequence = done
Stop

I also insert Var State %BootSequence ~ done as a trigger for all my other profiles to make sure they're disabled at boot and that they can only be re-enabled after my main flags are back to their defaults.

While this system has been working beautifully so far, I feel as though it isn't as efficient as it could be. I put a lot of checks in there to make sure that none of the subroutines are skipped and all the variables are reset before they're modified by any other profiles. So I was wondering: Are any of the actions redundant and unnecessary? And is there any way to shorten the task while still making sure that it does everything it has to? Lastly, am I overly complicating things with this system? I'd be grateful for any input.

PS Apologies if I formatted that horrendously or if I misused any terms.

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
8,518
Link Karma
2,035
Comment Karma
6,385
Profile updated: 1 day ago
Posts updated: 1 week ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 years ago