I have a confession to make. I’m a huge nerd. Sometimes when I lay in bed at night, I have a tough time falling asleep because I’m dreaming up a new project or thinking of ways to improve an existing one. Music helps me to take my mind off of these things and fall asleep, but if it continues to play through the night my wife will wake up. That’s where my Tasker Sleep Timer comes in. I start my music, tap a button, and the music will play for an hour before pausing.
Tasker Sleep Timer
Creating a sleep timer in Tasker is actually pretty easy. At its most basic, we can boil it down to just 2 actions. I’ll first show you how to create the most basic task, and then expand on it. The first action we need is a Wait action. I set it to 1 hour. That means 1 hour after you run the task, your music will pause. Feel free to adjust it based on your preferences.
The second action we need is a Media Control action. You can find it under Media > Media Control. When configuring the Media Control action, you want your command to be set to “Pause”. You also want to check the “Simulate Media Button” checkbox. Well, that’s it! You just created a basic Tasker Sleep Timer!
You can use Power Toggles to create a shortcut to this task in your notification shade. Launch Power Toggles, click on Notification, and then go to Customize. Click “Add Toggle”. Then go to the Custom tab and find “Task Shortcut”. After that, just find your Sleep Timer task! When you click on the toggle in your notification shade, the Sleep Timer task will run.
Another potential improvement to your Tasker sleep timer is to add a notification that the sleep timer has been set. Find the Notify action underneath the Alert category when adding a new action. Check out the below picture for an example!
Well, that’s it for now! This was just meant to give you a quick introduction on how to create your own Tasker sleep timer. As for how to improve it, that’s up to you! My sleep timer is fancier than what I’ve shown here, but this is a good start!