Daily Reminder, Random Time

If I wanted to remind myself of something every day I would probably use a Calendar entry. My problem though was to remind my girlfriend to take her birth control pill! She only has a dumbphone so SMS seemed the best option. I didn't want to send the message at the same time every day (boring and predictable, easy to ignore!), so in this example I will show you how I used Tasker to send a message at a random-ish time each evening.

I hope once you have my example up and running it should be obvious what you need to do to customise it to your needs! The way I implemented this requires two profiles - the main one to send the SMS, and another to reset a variable each day. I just put this in with another profile I had which does some other once-daily tasks.

The main profile

This is available to download from MediaFire

  • Start a new profile, call it what you like, but remember it for later. I called it "Pill"
  • Give it a time profile, from 2100 to 2359, repeating every 14 minutes.
  • Add an enter task - it is not necessary to name it, though you may.
  • Add the following actions:
  1. Tasker / If
    • %PILLWAIT != set [If %PILLWAIT is not set i.e. is undefined]
  2. Variable / Variable Randomize
    • Name = %PILLWAIT
    • Min = 1
    • Max = 13
  3. Variable / Variable Set
    • %PILLCOUNT = 0
  4. Tasker / End If
  5. Variable / Variable Add
    • Name = %PILLCOUNT
    • Value = 1
  6. Tasker / If
  7. Phone / Send SMS
    • Enter the details you require. I chose not to store in the messaging app since there will be one every single day clogging up the conversation window.
  8. Variable / Variable Clear
  9. Variable / Variable Clear
  10. Alert / Notify
    • Title = "Reminder SMS sent!" [This is optional, but it's useful to add initially to make sure its getting sent OK each day]
  11. Tasker / Profile Status
    • Name = Pill [Change the name here to what you used]
    • Set = Off
  12. Tasker / End If

So this profile creates a random variable to decide what time to send the SMS at, then each time it runs it increases a counting variable by one until the two are equal, at which point the message is sent. At the end it disables itself so it doesn't just keep increasing the variable until the end of it's time context. We need another profile to turn it back on - this MUST run outside the times you set in the time context above, i.e. not between 2100 and 2359 for my example.

The reset profile

This one is very simple so I couldn't be bothered to upload it for you, just make it yourself or integrate it with any other one-shot daily stuff you may have going on. For example, I added it to my script which turns down the brightness and volume at night. The following are instructions for making a fresh profile, just follow them exactly if you're unsure.

  • Start a new profile, call it what you like, I recommend "Daily Chores"
  • Give it a time profile, I set it to run at 0030.
  • Add an enter task - it is not necessary to name it, though you may.
  • Add the action;
  1. Tasker / Profile Status
    • Name = Pill [Change the name here to what you used]
    • Set = On

And you're done!

NB that the repeat period of 14 minutes, multiplied by the max number of repeats (13-1 =) 12 comes to 168, just under our (2359 - 2100 =) 179 minute time period specified in the context. If you change any of these number you need to do the same calculation to make sure that the your task can complete within the time you have allowed it. Be aware that if you set the repeat time low and the number of repeats (%PILLWAIT max value) high, your phone will be kept awake by Tasker which will cause increased battery drain.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License