Intention is not to create/add queue item by Dispatcher bot but generalise logic to work for multiple components and create queue item which can trigger performer bot as per trigger schedules (postponed period).
Problem is to define generalise logic of triggers as few components triggers are in minutes, hours (daily) and custom based on frequency (weekly).
Triggers definition is actually business requirements which can vary based on multiple components to run.
can you show us the combinations you are referring to? → refer below scenarios
So that we can suggest the solution specifically to that?
Of what I understand is you will have queue items created and you need the items to be triggered as per the trigger.
And that triggers are taken from data service. is this correct?----> That’s true. I thought to keep two fields in DS entity to define triggers (frequency : daily, weekly, custom) but confused in trigger (daily(2 hours), daily(15 minutes)or weekly(8 pm on Monday, Thursday), monthly(22nd, 7 pm) or many more scenarios.
Ideally bot should understand each triggers before creating queue item to trigger on specified timings.
@rahulsharma : Thanks for sharing the details. How to define triggers time logic in your example. In your table, you have referred two columns only but trigger time column is not mentioned.
For example if one component needs to run in every “15 min”. Is it fine to define triggers column as “15 min” as keyword so that dispatchers reads column value (15 min) and adds queue item for performer bot for trigger in every 15 minutes.
This logic is not scalable if triggers for another components are defined as weekly for e.g. (twice a week : Mon, Fri) at 2 pm etc or some other variations of schedule.
I am fine with key, value pair (daily, weekly) but dispatcher bot should understand trigger time column to schedule.
Note : i tried exploring triggers as cron expression but there is no activity found to read cron expression in Studio and create queue item for performer bot to trigger at defined trigger (cron expression).
I mentioned that the dictionary should be used to map the text entered by business to the standard keywords, so that we can have a common keyword used to schedule a particular job.
read the trigger, check if that starts with monthly, weekly or daily. Record that
If that is monthly → you will have the date and time
If that is weekly → you will have the days and time
If that is daily, it will be having a time or timegap
so you need to have all the above condition designed using switch OR if
then as per the syntax if those respective condition, you need to have the extraction. If that is monthly, then you can split the string using “,” then use the first part as date and second part as time. Similarly for others…