Scheduled Notifications (recurring email at time of choice, in time zone)
I'm wondering about the best way to approach scheduled notifications.
Having users who set their timezone and pick the best time to receive a regular notification (can be daily or less often), I came up with 2 options.
Option A: Individual schedules
Use resque-scheduler with dynamic schedules, one per user.
Each schedule has its own frequency and will call SendDigestJob, which itself tells the Mailer to prepare the mail and deliver it now
Option B: Batch deliver_later
Run a task every hour, fetch the users who should receive their notification in the next hour, and call the Mailer with "deliver_later(wait_until:)"
Option A is my favorite but will result in a myriad of scheduled jobs.
Am I missing something? Are there better options?
Thanks