Open aliirz opened 8 years ago
Currently offer is not saving in database. So I don't have offer's link in that case. One more thing as we are not storing oauth token in data of that perticular offer. So we can't share link on social media accounts via cron.
Can you go through and let me know what will be the work flow of this task?
Can we get a cron job to send the offers via emails only for now?
Yes sure, we can do that.
Schedule is added now and its working. All is need to add a cron job with the following.
If you run manually: rake routine_task:send_offers_email
Amir how do we schedule this programatically? The requirement is to schedule an offer when its created to be sent out via email on a specified datetime. How does this achieve that?
Currently Its working like a cron job. When that cron job will execute. It sends email to all users that have created offer. See my comment and let me know if still its not clear to you.
ok no worries. I will refactor the necessary logic myself. Thanks
Write a cron job that shares the offer's link on connected social media accounts & sends it via email to customers.