I am currently working on a expo app where users can set notification times for varying things within the app. The notifications can vary between once a day to once a week or not at all. There can also be multiple notifications at the same time for different items within the app.
The users expo push notifications tokens are saved to the database I have for the app along with the items that need notifications along with their frequency.
What would be the best way to handle sending the notifications when they are needed to be sent out?
Currently I thought I could have a cron job ping an API endpoint every minute that iterates through each user and determines if they need notifications, and when. Then it would send out the users notifications that match the saved notification time and day with the current time and day.
While this method might work, I worry about the scalability of it.
Any ideas, suggestions, or comments would be greatly appreciated!
(I also have very little money, so I am trying to find the most economic solution to this.)