So I'm setting up a fairly extensive report schedule for my app. Essentially in the create or update actions of this schedule model, I will schedule a background action for the appropriate time/day. Then at the end of that background action I'll schedule the next one, and so on.
But I'm going to need to introduce some logic here incase the user changes the schedule at all. Obviously we can't currently cancel background actions via the API so I'm thinking I'd need to a way to check if when the next scheduled action runs, matches the time the the schedule record is currently set to. Which means if it matches I can send the report and schedule the next background action.
Where I'm stuck is how I can handle checking if the background action matches what the current record schedule is set to, does anybody have any suggestions at the best way to approach this?
(attached a couple screenshots just to show how sophisticated the schedule UI is)