0

I have a MySQL database with nodeJS server. I want to implement a notification functionality which is as follows. Once a user registers, I want to (inform) send some particular information to the user that runs in fixed time interval. Something like a task management and tracking. If user A registers at 10am local time, notification must be sent 24 hours after A registers ie (notifications depends upon time that user registers however with a fixed interval). How do I implement this solution. I have looked at jobs in sql and cron jobs in NodeJs however I'm not sure of the approach, any guidance would be appreciated.

P.S. What would be the approach for same problem with mongoDB?

4
  • Sounds like a simple scheduled batch process. Only database need is a query that shows who registered over 24 hours ago who hasn't already been sent a notification. Am I missing anything? Commented Jul 25, 2021 at 15:43
  • @candied_orange I believe this approach helps Commented Jul 26, 2021 at 15:08
  • I suspect you’ll want a way to tell who should have been sent a notification by now who hasn’t been. Because things break all the time. Commented Jul 26, 2021 at 15:11
  • @candied_orange exactly yeah, this is what I'm looking for. Commented Jul 28, 2021 at 2:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.