A better approach I believe is to use redis/resque to queue the emails
to be sent -- and then use resque-scheduler to schedule the jobs to
run whenever you want them to run.
There are a bunch of reasons why redis is a better approach to queuing
work in general, so I''d look into this.
What you want is:
- redis installed on the machine
- The gems:
resque
resque-mailer
reque-scheduler
Here''s a pointer to the current set of resque plugins --
you''ll find
the scheduler and mailer plugins described there.
https://github.com/defunkt/resque/wiki/plugins
Good luck.
On Tue, Apr 10, 2012 at 12:18 PM, Javier Quarite
<jquarites-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> On Tue, Apr 10, 2012 at 11:16 AM, honey ruby
<emailtohoneyruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
>>
>> hey everyone i want to send mails by scheduling the time
>> dynamically.lets say in a single table i have all the employee logs
>> who came at different timings.they are from different locations and
>> departments. i want to send mails to different mails ids according to
>> there location to there HR. can i do this with cron job.
>>
>> thanks in advance
>>
>
> I''ve seen this cast
>
> http://railscasts.com/episodes/164-cron-in-ruby
>
> and it has its revised episode, maybe it helps, or just go to see the
> documentation of the whenever gem
>
> JavierQ.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.