I’m working on this little experiment: I am trying to schedule a queue of orders in the database with a due date and I want to trigger some workflow when the due date is met.
I was able to do this using the frontend workflows, checking every second for a due date of any order in queue matching current date time and then triggering an action.
Now I want to use the backend for this.
I was thinking of NOT using the scheduled workflows, because:
The experiment intends to scale up the queue to a large number (1000s of orders) and—not sure of how scheduled workflows work—assuming that will kind of clog the system after a while. In my mind a single workflow to check whether the due date of some order is met, seems a lot lighter and resource efficient (correct me if I am wrong).
I want to be able to cancel workflows easily without having to call the cancel API workflow with the ID. If I can apply a cancel status to the order, it would just not meet conditions to be executed.
Maybe I’m just overthinking it and schedule workflow is just fine?
Anyway questions are :
Is there an alternative to scheduled workflow, where I can look for the due date and run a workflow then?
Is there a limit to how many regular scheduled API workflow I can schedule in advance?
Is there a middle way?