Scheduling E-mail Alerts


#1

Greetings RoR:Talk,

I’m in the process of developing a web application for my company.
It’s a simple app developed to alleviate a portion of manual tasks for
our administration department. It’s core function will be to send an e-
mail alert to a user (or distribution list) in our administration
department when an item’s warranty date is near expiration.

Now, what I have developed so far is that a CUSTOMER has many ITEMS.
These ITEMS belong to a CUSTOMER. An ITEM has a warranty end date.
This structure is already in place and functioning correctly.

The next step I would like to take is to implement an automated
mailer. What I am unsure of is how to create a script of some sort
that will run daily, figure out which customer’s items are nearing
expiration, then e-mail our internal user. I’d say a good time frame
for when the e-mail is sent would be a week from expiration. That
could change, but a week would be good for now. This gives our staff
enough time to gather the required materials for the specific customer
and contact them about renewal.

Can all of this be handled with ActionMailer?

  • Mark

#2

Hi,
Watch these and I’m sure you will find a solution to your problem…

http://railscasts.com/episodes/129-custom-daemon
http://railscasts.com/episodes/128-starling-and-workling
http://railscasts.com/episodes/127-rake-in-background