Reputation: 83
I need to send emails to the user who sign up on my system. So, for instance say a user sign up today then after 3 days they should receive one email. Then after 6 days he should receive another email and so forth. There are 8 emails with the interval of 3 days.
I need to run a task where every midnight or every 12 hrs and that task should check whether are there any user who created account in 3,6,9,etc days before. I am aware of Rufus-Scheduler and even it works fine but I am not sure it is good to use it as my production configuration is unicorn and ngninx.I am also using sidekiq in my application for devise async emails.
Is there any other way to implement this or what would be the best way to implement such a system. Thanks in advance for help
Upvotes: 0
Views: 76
Reputation: 493
You can use reschedule method of sidekiq
Sidekiq::ScheduledSet.new.find_job().reschedule(1.day.from_now)
Upvotes: 1
Reputation: 27747
My best recommendation would be:
Use mailchimp because you'll get better visibility on open/close rates and it will automatically deal with things like the user wanting to un-sub from your emails (which you are required by law to allow them to do). You also get better ability to do nice things with filtering the list of users eg sending a special email to users that have not yet seen the X email or who opened every email...
Upvotes: 1