Automating your wake up alarm using Tasker

Setting your wake up alarm, you have two choices. Either you let it automatically wake you at a set time and let that alarm repeat, or you can do it manually which is a tedious and repetitive job.

The choice seems obvious, just pick the first option! However, this can quickly turn out very annoying when you have a day off and forget shutting off the alarm. Having it wake you up at 6AM can easily turn your mood on what should be a fun day.

Since this has happened to me a few times, I decided to tinker something together using Tasker. This is an amazing Android app that allows you to automate anything, from Settings to SMS.

I created a Task that sets the alarm on weekdays and let the task trigger at 5 minutes after midnight. Inside the task, I used a variable for hours and minutes. This way I can easily adjust them, if needed, in Taskers var window. They are named %AlarmHour and %AlarmMinute. You could also create tasks to set these variables for you, depending on other conditions.

At this point, we've built an alarm that mimics the behaviour of option #1, the automatic alarm. So what about our vacation days? To solve this issue, I added an extra condition to the task to check my calendar. I have the tendency to add an all day event in my calendar named Vacation when I have a day off. So having it check if there is a Vacation task in my calendar is exactly what I needed.

Now the task will only run on weekdays I don't have a day off. Perfect!

For your convenience, I exported the task. The generated xml, for those that want to import it, is as follows:

<TaskerData sr="" dvi="1" tv="4.7u1m">
    <Profile sr="prof7" ve="2">
        <nme>Set Alarm On Weekdays</nme>
        <Time sr="con0">
        <State sr="con1" ve="2">
            <Str sr="arg0" ve="3">Vacation</Str>
            <Str sr="arg1" ve="3" />
            <Str sr="arg2" ve="3" />
            <Int sr="arg3" val="0" />
            <Str sr="arg4" ve="3" />
        <Day sr="con2">
    <Task sr="task6">
        <nme>Set Alarm</nme>
        <Action sr="act0" ve="7">
            <Int sr="arg0">
            <Int sr="arg1">
            <Str sr="arg2" ve="3">Time for work!</Str>
            <Int sr="arg3" val="0" />

Steven Thuriot

Developer, tinkerer, lifetime student, full time nerd and somewhat of an otaku. Graduated applied computer science. Likes to complain about traffic.