# Startup/shutdown hook for a rails application?

**URL:** <https://www.ruby-forum.com/t/startup-shutdown-hook-for-a-rails-application/54478>\
**Category:** Rails\
**Created:** [March 6, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/startup-shutdown-hook-for-a-rails-application/54478 "2006-03-06T17:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_Schlueter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@Axel\_Schlueter](https://www.ruby-forum.com/u/Axel_Schlueter)\
**Post date:** [March 6, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/startup-shutdown-hook-for-a-rails-application/54478/1 "2006-03-06T17:30:08Z")

</div>

My rails application needs to start an additional tcp server.  
Is there any location in a rails app which gets executed  
exactly once while ‘booting’ where I should add the execution  
of the external server thread ? Same thing for shutdown ?

## Axel

Friendship is unnecessary, like philosophy and art. It has no  
survival value; rather, it is one of those things that give  
value to survival. – C.S.Lewis
