Hi Jim,

One solution is to schedule all of these events as jobs to be processed by
delayed job workers at the specified time. Take a look at the Heroku Delayed
Job documentation for info on using workers and setting up DJ. The
documentation doesn't cover job scheduling using the :run_at parameter, but
you can basically set the time you'd like a job to run.

When an event gets scheduled in your system you can calculate the times
you'd like your reminder emails sent, and add them all to the delayed job
queue. The downside to this approach is that if the event time/date gets
updated then you'll probably want to remove the scheduled jobs, and
recalculate the new times.

-Doug

On Mon, May 17, 2010 at 10:36 AM, Jim Jones <[email protected]> wrote:

> I'm new to Heroku and am trying to figure how I would accomplish the
> following?
>
> I've got an Events table that stores the date an event is to occur.
> I'd like to automatically send out an email to a user when that event
> is close (ie. 1 day away, 1 hour away, 15 minutes, etc).
>
> How would I do this with Heroku?  I was thinking I could have a cron
> job run every minute, that searches for events that are coming up, but
> it looks like I can only use hourly cron jobs, which would miss my 15
> minute requirement.
>
> Any thoughts?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<heroku%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to