Tuesday, April 1, 2008

BackgrounDRb

There are often times when you want to perform scheduled tasks, such as email reminders. These tasks are usually triggered at a specific time, and not necessarily by a user action.

On a unix machine, cron jobs do exactly this. They are triggered at a particular time, do their work, then go away. I looked around for a bit to see if there was a rails plugin to handle jobs like these.

Behold: backgrounDRb. This is a rails plugin that runs its own server to do a multitude of jobs. It supports cron jobs, but at the same time, it handles jobs in the background. For instance, if you are generating a large document, you don't want the user to wait for a long time. Instead, it will spawn a job in the background, allow the user to continue doing his/her stuff, and periodically check when the job is done.

For my purposes, I only needed the simple ability to create cron jobs, so I have yet to experiment with the background tasks. However, I found it to be super easy to use and everything is very straightforward.

If you're looking for a scheduler type plugin, look no further. This baby is amazing!


W

No comments: