My 2c. Scheduling can be tricky - what granularity is being used? What is being scheduled?
I have several apps with schedulers built in, (obviously not ubot code) I can tell you what I have found useful. Whether that maps onto something that works for ubot only ubot can decide.
1. The bot is started either manually or by the Windows task scheduler. Not the job of the internal scheduler to run the bot. A command line option determines whether the scheduler is active.
2. Schedule items are contained in a list. each entry consists of a time and a duration e.g. . - hhmm ddd with duration in minutes by default. I've never needed more than 0000 - 2400, but you could get fancy with days of the week or dates as well.
3. when the bot is started with the scheduler enabled, it determines where in the schedule it fits and then continues from that point onwards. If the schedule says it should be active, it does NOT activate, but waits for the next start event.
4. You need some override option so that you can enable / disable the scheduler manually.
5. The scheduler sets/resets a property isActive. While isActive is true the bot will do whatever it is supposed to do. This way logic in the bot can determine whether it makes sense to run or not as well. If things are bad, it can switch itself off.
The UI I have is a simple grid with start time and duration. The grid is kept sorted by time and you can insert, edit, delete entries. Different schedules can be saved and reloaded. I also have a random scheduler which allows the user to configure certain parameters to control attributes of the schedule.
There are plenty of ways to do something like this, the above works for me.