Skip to main content

7 replies

csteward
Brainy
Oct 3, 2022 5:28 PM UTC

It sounds like you would like to setup a task that runs on a dynamic schedule based on some sort of admin configuration set through a separate interface?

This is certainly achievable, but you will most likely want to work outside of the direct task recurrence configurations.  Such as, your admin interface controls a database table with scheduling, then you have a parent process which checks for this schedule and maybe waits at a timer node until the next task should fire.  Then when updating the schedule, have the admin process cancel/re-trigger the parent timer process, etc.

Can you provide some more details on the use case?  A task that runs daily at 10 AM, but you can change it to 11 AM via the admin interface, etc?  Multiple tasks at once or a single task?

abigaila
Participating Frequently
Feb 26, 2024 7:49 PM UTC

Do you have an update on how you achieved this? I have a similar use case where end users can setup sets of recurring tasks, for example, settings task A to run every Friday at 8 am and tasks B and C to run every quarter. I wouldn't want to have long-lived processes and also not have a parent process running (every hour for example) checking if any settings are met.

Any suggestions?

stefanhelzle0001
Brainy
Feb 26, 2024 8:03 PM UTC

Store these recurring setup to database and start processes at the dates.

abigaila
Participating Frequently
Feb 26, 2024 8:47 PM UTC

Do you mean having a process to regularly query the dates in the DB and if they match run it?

If so, what if I have a task that should run every Friday at 8 am and another task to run every Friday at 2 pm? Should the process model run every hour and check for the settings? I'd want to have flexibility but also think about volume in the future