I’d like to add something like a “background” thread to a rails application. I need to check emails from time to time (let’s say every 10 minutes) and then do something according to the emails. This should work the same way as the bug trackers work, you can reply to an email you got from the bug tracker, and it will take the email and add it to the ticket.
Is there any easy way of running something like this in the background? I don’t want to use cron, or any system tools, just pure ruby. I start application, and I shouldn’t care of anything else.
EventMachine have PeriodicTimer
rufus-scheduler is a tool of cron-like write in pure Ruby base EventMachine.