probo icon indicating copy to clipboard operation
probo copied to clipboard

Feature Proposal: Support for Recurring Tasks Linked to Controls

Open ajotaops opened this issue 1 year ago • 5 comments

Feature Request: Recurring Tasks for Controls

Hi team,

First of all, thanks for your amazing work on this project 🙌

We're exploring your project for a GRC use case and were wondering if there's any plan to support recurring tasks linked to controls.

These would be tasks that need to happen on a regular basis — not just one-time implementations — such as:

  • Monthly backup verification
  • Quarterly access reviews
  • Annual certificate renewals

Right now, it seems like all tasks are tied to implementations (measures), but these recurring operational activities are essential for maintaining compliance over time.

Is something like this already planned?
If not, we’d love to propose it as a feature and are happy to help contribute.

Thanks!

ajotaops avatar Aug 06 '25 11:08 ajotaops

Thanks for your message. Yes we intend to implement this feature in the future and don't hesitate if you want to contribute.

SachaProbo avatar Sep 05 '25 08:09 SachaProbo

hey @SachaProbo would like to take this up,

have mentioned by plan below, THOUGHTS??

PLAN

extend task model with a is_recurring field and a recurring_state field. this recurring_state will be a json and will have next_creation_date(when this task is next created), frequency(like quaterly,monthly,anually with respect to the date of creation of task), and a parent_id (self join), when paernt_id is empty then this is the first task for this recursive relation, and all other recursive task will look at the parent for the task metadata like name desc etc

continue to have this Task -> Measure -> Control. no direct task-to-control link. to link a recurring task to a control, first link the measure to the control , then link the task to that measure.

a background worker runs periodically (daily) to check for tasks with is_recurring true and no parent_id and this worker checks for the due date. when the due date is reached, it creates a new task instance by copying task properties (name, description, measure_id, assigned_to, etc.) from the parent task, setting the new instance's state to TODO, and updating the parent task's recurring_state->'next_due_date' to the next period based on the frequency pattern.

the created_at field of the first task of this recurrence relation, is the date when this recurrence was first created.

Example say on January 1st, the background job finds a task with next_creation_date = '2024-01-01' in its recurring_state. it creates a new task instance on that date, copies all relevant properties from the parent, and updates the parent task's next_creation_date to February 1st (for monthly recurrence). this creates new instances automatically while maintaining the link to the original measure and, through it, to the associated control.

manish-singh-bisht avatar Dec 12 '25 07:12 manish-singh-bisht

cc @gearnode @codenem

manish-singh-bisht avatar Dec 12 '25 07:12 manish-singh-bisht

Hello! I think it would be best to have a new table storing the task recurring state (instead of first task):

  • last revision (time.Time)
  • recurring expression in RRULE format (https://datatracker.ietf.org/doc/html/rfc5545) (+ it handles exceptions) if we ever need to connect with calendars or CRON (but is less flexible for calendar like with human input features)
  • timezone?

codenem avatar Dec 15 '25 11:12 codenem

Hello! I think it would be best to have a new table storing the task recurring state (instead of first task):

* last revision (time.Time)

* recurring expression in RRULE format (https://datatracker.ietf.org/doc/html/rfc5545) (+ it handles exceptions) if we ever need to connect with calendars or CRON (but is less flexible for calendar like with human input features)

* timezone?

pardon for replying late, was doing some other pr

  1. can we also add next_run field, because using just the last_revision we will have to query all records in the task_recurrence table and calculate the next run for each, but with the next_run we can index this and can only get those which tasks which satisfies next_run<=now, thoughts??

  2. for timezone, we can store another field timezone IANA string, we will store the time in UTC and convert to the respective tz dynamically in the worker. in the frontend we can have a list of timezones which we can show as dropdown for the users to select. thoughts??

  3. what should be the frequency of the worker? 1 minute?

thoughts?? @codenem

manish-singh-bisht avatar Dec 19 '25 07:12 manish-singh-bisht