smos icon indicating copy to clipboard operation
smos copied to clipboard

Recurrence within smos

Open tusj opened this issue 3 years ago • 8 comments

I am looking into how to model repetition and recurrence with smos. I am aware that I can use smos-scheduler + templates to automatically generate new tasks, but what is missing for me, is recurrence. That is, "repeat this task in two weeks when completed". Examples fitting into this behavior would be, cut the hair, mow the lawn, etc. With Todoist, this is entered by writing every! in front of the date. I find that simple and intuitive. Would such a thing be possible / feasible with smos?

tusj avatar Nov 22 '21 13:11 tusj

Ah yes this is haircut recurrence, as opposed to rent-recurrence. I use tickler for that: https://tickler.cs-syd.eu/

NorfairKing avatar Nov 22 '21 13:11 NorfairKing

I have checked out tickler. However, I don't see how tickler can be used to do what I explain above. From what I can see, in tickler, the tickles are triggered blindly from a schedule, and not scheduled upon completion as I tried to explain above.

tusj avatar Nov 23 '21 09:11 tusj

@tusj that's right. The way I use it is by setting up a "Make a new haircut appointment project" tickle. In that project, the last task will be "set up a new haircut project tickle". (This is quite an uncommon use-case.)

NorfairKing avatar Nov 23 '21 09:11 NorfairKing

I see. So the new task will be added manually, not automatically. It can easily be done that way, but I have gotten quite fond of this particular automation. I guess we all are using the software differently, but for me, this is a very common use-case.

tusj avatar Nov 23 '21 09:11 tusj

@tusj I've been thinking about this a bit more.

Here are some more examples of haircut recurrence:

  • Massage
  • Dentist
  • Cleaning

Some thoughts:

  • It doesn't fit very well into a single-file project, because it's important that projects can be done.
  • We could re-use smos-scheduler to accomplish this if we add some metadata in the file about which scheduled project the project belongs to.

I would like to hear your opinion on this. Maybe we can still add this to smos-scheduler.

NorfairKing avatar Feb 04 '22 14:02 NorfairKing

How this would work:

  1. We add a setting to a project schedule that says whether it's rent recurrence or haircut recurrence
  2. When scheduling a haircut recurrence project, we somehow add metadata to the file to specifies which scheduled project it came from
  3. When checking whether to schedule a haircut recurrence project, we check when the last project in that schedule was completed, instead of when it would have been started.
  4. Just like with rent recurrence: when that last date is long enough ago, we schedule the project again.

Thinking about it again: This doesn't necessarily require a mapping from project -> schedule, but it does require a mapping from schedule -> project. So the metadata idea isn't necessarily right.

NorfairKing avatar Feb 05 '22 14:02 NorfairKing

When looking into repetition with smos-scheduler, I found it too cumbersome to use, as compared to what I am used to do with Todoist. The separation between smos and smos-scheduler seems unecessary to me from a user point of view, as all I want to do, is to specify the recurrence within smos. I see smos-scheduler more as an internal tool than a end-user tool.

Also, I find that rent recurrence is modelled wrongly as well. smos will only generate the next project as long as the previous is not done/archived. Let's say I have a weekly task/project. If I want to plan ahead, I can only see the very next project, not the subsequent ones.

I am thinking about calendars, e.g. Google calendar. For repeated events:

  1. the event is visible at all repetition intervals
  2. when editing a single event, the user is asked whether only the current event is to be modified, or all the events.
  3. these events are possibly infinite, thus one cannot pre-generate all events if there is no end-point.

If it is a requirement that projects should be done, then I agree with you that this doesn't fit into a single-file project. But it doesn't necessarily have to be that way. The way todo.txt works, is that you run an archive command, as in smos, which only archives the completed tasks and not the whole file.

I think that a general way in which haircut recurrence could be implemented, is to use events and hooks. This is used in e.g. Taskwarrior. When specifying a haircut recurrence, add a hook that listens to a completed event for the task at hand, and as action, reset task state (and optionally other metadata). Events and hooks could also be used to implement rent recurrence in its current form.

I hope you find my comments useful.

tusj avatar Feb 09 '22 09:02 tusj

@tusj Thanks for the comments! I really appreciate you taking the time to write down your thoughts.

Some more thoughts:

  • It's important to understand that there is an important distinction between events and projects. Events are about occurrences, projects are about managing yourself to accomplish a goal. Calendar software does events, smos is not calendar software and for good reason. (smos-calendar-import can give you read-access in smos, but doesn't let you export events.).

  • Hooks are not self-healing: if one does not fire or runs into issues, that problem does not gets fixed automatically. I don't think we can use them reliably.

  • Also, I find that rent recurrence is modelled wrongly as well. smos will only generate the next project as long as the previous is not done/archived. Let's say I have a weekly task/project. If I want to plan ahead, I can only see the very next project, not the subsequent ones.

    You can fix this by pre-activiting the number of projects you want to plan ahead. I haven't found this to be a problem in practice

  • If it is a requirement that projects should be done, then I agree with you that this doesn't fit into a single-file project. But it doesn't necessarily have to be that way.

    This is a hard requirement. The whole system depends on it. Archiving parts of a file also breaks this.

NorfairKing avatar Feb 09 '22 12:02 NorfairKing

Haircut recurrence has now been implemented in smos-scheduler

NorfairKing avatar Nov 11 '22 10:11 NorfairKing