[Backgroundrb-devel] stability of using scheduled workers

Levent Ali levent at leventali.com
Thu Aug 2 04:16:02 EDT 2007

To be honest... My answer would be no...

We have two scheduled workers that run hourly and are offset by thirty
minutes... We cannot get the scheduler to go 24 hours without skipping
a few schedules.  That's if we are lucky.  Usually it runs for at most
a day and then never schedules again.

I think it may have something to do with the scheduler code that
sleeps for 0.1.  There's a comment in the code near it.  I'm thinking
it may get into a rhythm where it misses the schedule point.  We tried
changing the schedule to prime numbers and other random points but the
same thing eventually happened.

What we do now instead is use standard linux cron and that calls a
rake task that spawns a backgroundrb worker.  Everything outside of
the scheduler function works like a dream for us.

Hope that helps..

On 8/1/07, simon.wilkinson at 434wireless.com
<simon.wilkinson at 434wireless.com> wrote:
> Hi,
> Going through the archive, and just keeping a general watch on this list seems to indicate that there are some issues using scheduling with backgroundrb.  I need a worker that will perform some actions on an hourly interval.  These actions will require access to several of the models in my application.  I am currently using backgroundrb to handle processing of files, where I spawn a worker to handle each file, and then destroy them afterwards.  This is working great, and I would like to use backgroundrb for this scheduled action, but I need it to be reliable.
> What is the general feeling among those that are using it for this type of application?  Does it reliably continue to fire at the proper intervals?
> Thanks,
> Simon
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

More information about the Backgroundrb-devel mailing list