# Callback on Shutdown

**URL:** <https://www.ruby-forum.com/t/callback-on-shutdown/131616>\
**Category:** Rails\
**Created:** [March 11, 2008, 10:34pm UTC](https://www.ruby-forum.com/t/callback-on-shutdown/131616 "2008-03-11T22:34:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/898d66/32.png) [@florian](https://www.ruby-forum.com/u/florian)\
**Post date:** [March 11, 2008, 10:34pm UTC](https://www.ruby-forum.com/t/callback-on-shutdown/131616/1 "2008-03-11T22:34:30Z")

</div>

Hey!

Im looking for a way to execute cleanup code before a rails instance  
is shutdown. Is there some kind of callback i can hook into? Something  
like on\_shutdown…? I tried to search the web, but everything i found  
relates to the active record callbacks, which are not helpful in this  
case.

Thanks a lot!

Florian
