# Where to "spawn" (background tasks in a rails app)

**URL:** <https://www.ruby-forum.com/t/where-to-spawn-background-tasks-in-a-rails-app/146676>\
**Category:** Rails\
**Created:** [August 23, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/where-to-spawn-background-tasks-in-a-rails-app/146676 "2008-08-23T23:20:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [August 23, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/where-to-spawn-background-tasks-in-a-rails-app/146676/1 "2008-08-23T23:20:51Z")

</div>

My rails app is using the spawn plugin to run some background tasks.

I’m wondering what is the most appropriate place to put a call to  
startup those tasks.

I’m thinking probably somewhere in boot.rb, though I’m not sure which  
method, and maybe it is inappropriate to put my own stuff in there. I  
looked around and did not find anyplace that seemed pre-ordained for  
startup tasks. (in the same way that we have pre-ordained directories  
for the MVC components etc.)

Can somebody who has set this up before give me a suggestion to save me  
from a bunch of trial and error?

thanks,  
jp
