sssss a écrit :> can you please tell me how to cerate an automated mail generation in
> rubyrails in specific time period .My requirement is to check the user
> last log in and generate an automated mail after 3 months or one year
This is the Rails-Spinoffs group, you might be better helped on the
Rails group: http://groups.google.com/group/rubyonrails-talk
Now, since your time period is *so* long, your best bet is to store this
kind of notification schedule in a simple table, with fields such as
intended date/time of delivery and user id (and possibly, if you have
multiple notifications, a notification kind field).
What you would have in your app is a thread-run simple objet that would
check this table, say, every minute or so, and gather everything that
happens right this minute. It then processes those and removes them
from the table.
Keeping this info only in RAM instead of DB for so long would be way too
risky: any reboot, Rails upgrade, whatever, and woops! You notification
schedule is gone!
''HTH
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---