My “Juice Defender” Tasker Profiles

In response to My Favorite Android App: Tasker, one reader asked how I set up my battery conserving profiles. These are totally a work in progress (and if someone has suggestions for how to streamline them, I'm open to hearing people's thoughts).


These are not official names for the icons. These are just what I'm calling them.

This is what I'm calling check.

This is what I'm calling X.

This is what I'm calling plus.

This is what I'm calling bolt.

And this is what I'm calling tag.

I'd also like to throw in a disclaimer here that I am not trying to replicate the exact behavior of Juice Defender. I just found with JD that the bulk of the savings was in turning off data when the screen is off, so this is a modification of that.

User-defined global variables

I'm not a programmer, but I do understand some basics of how to use variables, and I think the way I use these I actually had to define them. (You can find on the Tasker website a list of variables Tasker comes with—that is, ones you don't have to define yourself.)

  • Click tag to bring up the Global Variable Editor.
  • Click plus and define a new variable as %DATA.
  • When prompted for a Variable Value, input on if your mobile data is on and off if your mobile data is off.
  • Click check to confirm.
  • Click plus again define another new variable as %POWER.
  • For the Variable Value, input on if your phone is plugged into a power source (either AC or USB) and off if your phone isn't plugged in.

Data on when screen is on

  • Click plus to add a New Profile Name. You can call it whatever you want. I called mine Screen On Data On.
  • When prompted for First Context, select Event.
  • Select Display.
  • Select Display On.
  • For Task Selection, select New Task.
  • For New Task, you can call it whatever you want. I uncreatively called it Screen On Data On.
  • Under Task Edit, you'll see a blue plus above the check. Click that blue plus.
  • Select Task and then If.
  • Click tag.
  • Under Variable Select, select %DATA and after the tilda, type in off. Then click check.
  • Click blue plus and click Variable and Variable Set. Set %DATA to on.
  • Blue plus and then Net, Mobile Data, On.
  • Blue plus, Net, Auto-Sync, On.
  • Blue plus, Task, End If.
  • Click check.

Power Variable

Since there's no built-in variable for whether power is connected or not, we've had to create one. So let's make it work.
  • Green plus.
  • Name Power Variable.
  • For First Context, State, Power, Power, source Any.
  • Under Task Selection, New Task called Power Variable On.
  • Task, If %POWER off.
  • Variable set %POWER to on.
  • Task, End If.
  • Tap Power Variable On and then for Task Options, select Add Exit Task.
  • Call it Power Variable Off.
  • Task If %POWER on.
  • Variable Set %POWER to off.
  • Task, End If.

Data off when screen is off

  • Green plus.
  • Name Screen Off Data Off.
  • For First Context, Time.
  • Check Repeat and set it for every 5 Minute(s).
  • Check.
  • Under Task Selection, New Task and then call it Screen Off Data Off.
  • Blue plus, Task, If, %POWER, off.
  • If %SCREEN off.
  • If %DATA on.
  • Auto-Sync Off.
  • Variable Set %DATA off.
  • Mobile Data set Off.
  • Task and End If.
  • Another End If.
  • Another End If.

English translation

Basically what this does is say if you turn the display on, check to see if data is off. If it's off, turn it on, and then turn on auto-sync. And then every five minutes, check to see if the phone is plugged in and if the display is off and the data is on. If it's on, turn off auto-sync, and then turn off data. That's it!


  1. I am trying to follow this; but you never explain how to set %SCREEN and then you use it under “Data off when screen is off”. I never set up a %SCREEN in the first place!

  2. I figured it out…it’s one of the one’s that you don’t have to define. I’m going to give your profile a whirl. You might should upload this to the Tasker Wiki!

  3. Thanks, Dane. It works well, but I’m still testing it out and tweaking it, so I don’t think it’s wiki-worthy just yet.

    For example, I found out today that it’ll cut out data in the middle of a Google Listen podcast stream, so I’m trying to figure out a workaround for that.

  4. Will the %DATA variable still work if I don’t input it into the Global Variable Editor?

    Also, what is the purpose of the ‘End If’ task, and do I need to add one for every ‘If’ option in the profile?

  5. Thanks alot for your settings, I have just been setting up my tasker profiles for the last couple of days and a couple of things stumped me but your post made things make alot more sense to me and I have everything working as I want it now :)

Leave a comment

Your email address will not be published. Required fields are marked *