I have a ruby on rails app in which I\'m trying to find a way to run some code every few seconds.
I\'ve found lots of info and ideas using cron, or cron-like implementat
You can either write you own method, something like
class MyWorker def self.work #do you work sleep 15 end end
run it with rails runner MyWorker.work
There will be a separate process running in the background
Or you can use something like Resque, but that's a different approach. It works like that: something adds a task to the queue, meanwhile a worker is fetching whatever job it is in the queue, and tries to finish it.
So that depends on your own need.