Forum: Ruby on Rails Sending Scheduled Email Ticklers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mike L. (Guest)
on 2006-02-19 02:04
Hi All,

I am developing a RoR app for managing community information and would
like to have an summary of current events and interests mailed out
monthly.  The tickler email would be a basic summary of items and links
back to the site.

I would like to schedule the email delivery dates and have the app send
out email to registered users that opted for this service.  Once
scheduled, a monthly tickler would be sent out automatically.

Is there a RoR way of scheduling tasks like this?  I'm considering
setting up a cron job and kicking things off that way but would like to
have this integrated into the app as much as possible.  My motivation is
to keep the business logic together, since emails could also be kicked
off manually rather than scheduled.

Thanks,
Mike L.
Warren N. (Guest)
on 2006-02-19 02:51
(Received via mailing list)
On 18-Feb-06, at 4:04 PM, Mike L. wrote:

> Is there a RoR way of scheduling tasks like this?  I'm considering
> setting up a cron job and kicking things off that way but would
> like to
> have this integrated into the app as much as possible.  My
> motivation is
> to keep the business logic together, since emails could also be kicked
> off manually rather than scheduled.

Look at the Ruby no Rails Cron Plugin for starters.

Best Regards,
Warren N..
GNU (http://www.gnu.org.in)
Kyle M. (Guest)
on 2006-02-19 03:24
(Received via mailing list)
As Warren mentioned, I wrote a RailsCron plugin for tasks like this.
The svn repository is:

http://svn.kylemaxwell.com/rails_cron/trunk

Also, there's some helpful snippets, including an EmailQueue, on my
blog at www.kylemaxwell.com.

If you have and questions/comments/feedback, please post it on this
list, which I read regularly.

Good luck!
Kyle
Jim C. (Guest)
on 2006-02-19 07:45
(Received via mailing list)
On Sun, Feb 19, 2006 at 01:04:17AM +0100, Mike L. wrote:
> Is there a RoR way of scheduling tasks like this?  I'm considering
> setting up a cron job and kicking things off that way but would like to
> have this integrated into the app as much as possible.  My motivation is

Absolutely use cron - it's job is keeping track of time ;-)

However, the actual mailing could be kicked off by asking cron to call a
web page, e.g. "wget http://server/railsapp/monthlymailing", and
therefore it's your app that does the work.

-jim
Mike L. (Guest)
on 2006-02-20 00:19
Kyle M. wrote:
> As Warren mentioned, I wrote a RailsCron plugin for tasks like this.
> The svn repository is:
>
> http://svn.kylemaxwell.com/rails_cron/trunk
>
> Also, there's some helpful snippets, including an EmailQueue, on my
> blog at www.kylemaxwell.com.
>
> If you have and questions/comments/feedback, please post it on this
> list, which I read regularly.
>
> Good luck!
> Kyle

Thanks.  I'll let you know how things go.

Regards,
Mike
This topic is locked and can not be replied to.