I was wondering what the best approach to scheduling API email and text reminders.
When someone creates an appointment on my application, I want to send them reminder emails and texts via API a day before their appointment and an hour before their appointment.
How would I go about scheduling API or workflows at certain dates and times?
You can setup a workflow under scheduler that will periodically run and query the database to find whatever needs to be sent. This is fairly easy to setup.
You can also drop tasks into a backend queue, but that is much more complicated. You’ll need the Bull queues extension.
Would you recommend creating another MySQL database table called “reminders” with each time a reminder needs to be sent to the person and relationship to their info? Then have the scheduled workflow query it every 5 minutes for date/times between a 5 minute range from the current time and then build out conditions to send the email and text?
Like this?
If so what schedule interval would you use? I just randomly picked 5 minutes.
Also what would be the difference between this and Bull Ques as I do need to learn Bull Ques at some point and how to implement them?