Timer service

hi everyone,

I have this case where I need to check some records in the database of a
specific data condition every 5 seconds and do some business logic if
this scenario is true.

Problem is there doesn’t seem to be any timer service in the rails
framework. Anyone have a general idea of how to attack this problem?

thanks,
-dan

Dan Q. wrote:

-dan

Hi there,

I would recommend using backgroundrb.
project page http://backgroundrb.rubyforge.org/
a helpful article - http://www.infoq.com/articles/BackgrounDRb

You could have a long-running task that sleeps for 5 seconds, checks the
database and does it’s thing.

You could also just run some plain ruby code in another process.

Backgroundrb lets your controllers talk to the long-running jobs.

Jason

Hey Jason,

What do you think about this… a friend sent it to me.

http://www.naffis.com/blog/articles/2006/07/04/installing-and-using-railscron

-dan

Jason E. wrote:

Dan Q. wrote:

-dan

Hi there,

I would recommend using backgroundrb.
project page http://backgroundrb.rubyforge.org/
a helpful article - http://www.infoq.com/articles/BackgrounDRb

You could have a long-running task that sleeps for 5 seconds, checks the
database and does it’s thing.

You could also just run some plain ruby code in another process.

Backgroundrb lets your controllers talk to the long-running jobs.

Jason

nice.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs