# Backgroundrb launched 8 workers via cron which I did not understand

**URL:** <https://www.ruby-forum.com/t/backgroundrb-launched-8-workers-via-cron-which-i-did-not-understand/167889>\
**Category:** Rails\
**Created:** [May 13, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/backgroundrb-launched-8-workers-via-cron-which-i-did-not-understand/167889 "2009-05-13T17:43:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 13, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/backgroundrb-launched-8-workers-via-cron-which-i-did-not-understand/167889/1 "2009-05-13T17:43:23Z")

</div>

I have a worker my\_tree worker as shown in my backgroundrb.yml file  
below.  
I played around with the trigger\_args setting which I had it calling  
update\_main\_tree() every 1 minute.  
This opens a tree structure in my db that I set and rebuilds it. After  
it seemed to be working ok, I then  
set the tree to be updated to be a larger tree and set the  
trigger\_args to happen at 8:00 pm, and then went home.  
I do not have reload\_on\_schedule set. When I came in the next day, my  
machine was nearly hung as at 8:00 pm  
according to my log file, 8 different workers got launched on  
update\_main\_tree()

:schedules:  
:session\_mgr\_worker:  
:expire\_sessions:  
:trigger\_args: 0 0 \*/6 \* \* \* \*  
:my\_tree\_worker:  
:update\_main\_tree:  
:trigger\_args: 0 0 20 \* \* \* \*

# :trigger\_args: 0 \*/1 \* \* \* \* \*

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 13, 2009, 6:33pm UTC](https://www.ruby-forum.com/t/backgroundrb-launched-8-workers-via-cron-which-i-did-not-understand/167889/2 "2009-05-13T18:33:22Z")

</div>

I noticed that the example in my book has an explicit exit() call at  
the end of the worker create(). I think that might have something to  
do with it as when I invoke other methods that  
create workers, instances of packet\_worker\_runner seem to hang around.  
I didn’t have such an exit() call in my code.
