Use Tasker to Block Apps at Certain Times

How I use Tasker on my Android phone to prevent myself logging on to social media sites at certain times of day.

Why I Want This

I get up earlier than everyone else in my household, and take a little time to prepare for the day. Towards the end of last year, however, I was allowing myself to be distracted during my morning routine. Instead of useful preparation, I was allowing myself time to mess about on social media sites.

So, at the beginning of this year I decided that I need to focus on improving my productivity using my Smartphone, rather than allowing it to become a distraction. I’m not ready to give up the likes of Facebook completely, but I don’t want it available first thing in the morning.

It so happens that I’ve had Tasker installed on my phone for a while. If you don’t know it, Tasker is an app which performs tasks (sets of actions) based on events (such as time, location, event, gesture etc). It occurred to me that I might be able to use Tasker to prevent me from running certain applications at certain times of the day.

How To Block Facebook Between 6:00 AM and 10:00 AM

I use Tasker to block Facebook between 6 and 10 in the morning. My approach is to set up two profiles:

  • The first sets the variable “MORNING_MODE” at 6am and clears it at 10am.
  • The second prevents Facebook from opening when the “MORNING_MODE” variable is set.

The result is that, if I try to display Facebook between the specified times, then I am returned to the Home screen.

Part 1: Set Up a Time Profile

  1. Crate a new Time Profile.
  2. Set its From time to 6:00 and its To time to 10:00.
  3. Create a new task for the profile called “Morning On”.
  4. Add a new action to the task. Pick “Variables”>”Variable Set”.
  5. Give the variable the name “MORNING_MODE”, and set the value to “1” (a value is required, but won’t actually be used, so you can actually set it to anything you like).
  6. Go back to the profile you’ve just created and add a “Disable” task.
  7. Create a new task for the profile called “Morning Off”.
  8. Add a new action to the task. Pick “Variables”>”Variable Clear”.
  9. Specify the variable name “MORNING_MODE”.
  10. Optionally, give the profile a name, such as “Morning”.

Part 2: Set Up an Application Profile for Facebook

  1. Create a new Application Profile.
  2. Select the Facebook app.
  3. Add a new task, named “Block Facebook”.
  4. Add an action to the task. Pick “App”>”Go Home” .
  5. Add an “If” condition to the task.
  6. Set its condition to “MORNING_MODE” Is Set.

Conclusion

Tasker isn’t the easiest of applications to get to grips with. Nevertheless, with a little patience I’ve been able to make it do some fairly nifty things.

5 thoughts on “Use Tasker to Block Apps at Certain Times

  1. Doesn’t work for me. Maybe you are using a different version of tasker but I was not able to follow your steps. First, it does not allow me to add multiple tasks to a Time Profile. Your step “Go back to the profile you’ve just created and add a “Disable” task.” has no specifics on what the action is for this task.

  2. Is it possible to do this but only if a particular app is in the foreground/active? I have an app that creates an overlay for my status bar but gets in the way whenever I want to read something with my ebook reader app. I would like the status bar app to re-engage when I close the reader as well.

  3. I had issues getting this to work on my onePlus. A few tweaks that made a difference:
    1) Under preferences, change “App Check Method” – “Accessibility” (with the permissions granted to tasker) worked much more reliably than the “App Usage” method (see https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00)
    2) In some cases, you may need to use an “App Change” action as an additional trigger, which triggers anytime the active app changes. You can use that (or in combination with an “IF” as part of your detection, which appears to work more reliably.

Leave a Reply to Evan Anderson Cancel reply

Your email address will not be published.