[Backgroundrb-devel] Doing max of N tasks per given time

Ramon Tayag ramon.tayag at gmail.com
Thu Jan 29 21:25:38 EST 2009


Hi Dale!  I suppose by table you mean something like ar_mailer?

Thanks,
Ramon Tayag



On Fri, Jan 30, 2009 at 10:13 AM, Dale Cook <petesalty at gmail.com> wrote:
> Ramon,
>
> What I would do is push all the records that need to be mailed to a table
> (or flag them in a table they already reside in). Then you can have BDRB set
> up to run once an hour - it picks up the most recent (or the oldest, or some
> other combination, your choice) and mails them, 250 each hour until there
> are none left. You can add in records whenever you want, confident that they
> will go out eventually.
> Trying to do it another way, i.e. sending out 250, then setting up a
> schedule to send out the rest, could be done but it's a lot harder and
> probably doesn't get you much more, especially for the 251st and onward
> email recipients, plus you then have to deal with the issue of that happens
> if you need to send another batch of 250+ within an hour of the first being
> sent - what to do then?
>
> You can read more about BDRB cron scheduling at
> http://backgroundrb.rubyforge.org/scheduling/ (this isn't one of my
> strengths unfortunately).
>
> Hope this helped some.
> Dale


More information about the Backgroundrb-devel mailing list