title: Send multiple notifications to a user on specific time
body: <p>So I have database of users which have a <code>reminderTime</code> field which currently is just a string which looks like that <code>07:00</code> which is a UTC time.</p>
  
  <p>In the future I'll have a multiple strings inside <code>reminderTime</code> which will correspond to at which time the user should receive a notification.</p>
  
  <p>So imagine you logged into an app, set a multiple reminders like so <code>07:00</code>, <code>15:00</code>, <code>23:30</code> and sent it to server. The server will save those inside a database and run a task and send a notification at <code>07:00</code> then at <code>15:00</code> and so on. So later a user decided that he will no longer wants to receive notifications at <code>15:00</code> or change it to <code>15:30</code> and we should adapt to that.</p>
  
  <p>And each user has a timezone, but I guess since <code>reminderTime</code> is already in UTC I can just create a task without looking at timezone.</p>
  
  <p>Currently I have a <code>reminderTime</code> as <code>number</code> and after client sends me a <code>07:00</code> I convert it to seconds, but as I understand I can change that and stick to <code>string</code>.</p>
  
  <p>All my tasks are running with <code>Bull</code> queue library and <code>Redis</code>. So as I understood the best scalable approach is to take <code>reminderTime</code> and just create notifications for each day at a given time and just run the task, the only problem is that should I save them to my database or add a task to a queue in <code>Bull</code>. The same will be for multiple times.</p>
  
  <p>I don't understand how should I change already created tasks inside <code>Bull</code> so that the time will be different and so on.</p>
  
  <p>Maybe I could just create like a 1000 records at which time user should receive a notification inside my database. Then I create a repeatable job which will run like every 5 minutes and take all of the notifications which should be send in the next couple of hours and then add them to a <code>Bull</code> queue and mark it that it was sent.</p>
  
  <p>So basically you get the idea, maybe it could be done a little bit better.</p>