Smart Background Thread Task in Ruby on Rails?

Posted by elado on Stack Overflow See other posts from Stack Overflow or by elado
Published on 2010-05-08T21:34:34Z Indexed on 2010/05/08 21:38 UTC
Read the original article Hit count: 231

I need to perform a task every 5 seconds, but only when users are using the application.

As for now, I use cron that works every minute and activates a task that repeats itself every 5 seconds with sleeps between, for a minute. However, it works also when the application isn't being used.

Is there a gem that will do this kind of thing?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about cron