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.