Is there a long running task which should be handled in the background? One of the best ways is using the delayed_job plugin like I show in this episode.

Read more at the source