VadaPay / Multifi-Rails

0 stars 0 forks source link

Offer Scheduling #7

Open aliirz opened 8 years ago

aliirz commented 8 years ago

Write a cron job that shares the offer's link on connected social media accounts & sends it via email to customers.

amaris4you commented 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?

aliirz commented 8 years ago

Can we get a cron job to send the offers via emails only for now?

amaris4you commented 8 years ago

Yes sure, we can do that.

amaris4you commented 8 years ago

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

Or see: https://github.com/javan/whenever

aliirz commented 8 years ago

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?

amaris4you commented 8 years ago

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.

aliirz commented 8 years ago

ok no worries. I will refactor the necessary logic myself. Thanks