Scheduled daily events

Hi there!

This is my first Watch App that I'm trying to create.

Many searches and reading documentations later I'm finally here to ask the experts.

In its simplest form I would like my app to set up a daily task to run at a specific time of the day. The task may or may not create an alert/notification. This will later evolve to something configurable where the user can choose which days and at what time every day to be notified.

What would be the recommended way to set up this event scheduling?

Basically what I want in the end is an "alert" at the end of the day if I haven't reached my steps goal of the day;

  1. User will choose days of the week and what time (this can be set up in so many ways)
  2. The app will schedule a task to be run at set time and days
  3. When the task is invoked at set time it will check if goal is reached
    1. if goal reached -> do nothing
    2. if goal not reached -> alert (notification with sound | vibrate or something

Maybe there's already an app for this, but I haven't found it. I'm using Venu2 at the moment.

Anyway, I like optimizations and I don't want this to be something that drains the battery.

If someone could steer me in the right direction with pseudo code or code samples that does something similar would be great!

Thanks.