# Help with background rb triggers!

**URL:** <https://www.ruby-forum.com/t/help-with-background-rb-triggers/134790>\
**Category:** Rails\
**Created:** [April 15, 2008, 4:47am UTC](https://www.ruby-forum.com/t/help-with-background-rb-triggers/134790 "2008-04-15T04:47:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [April 15, 2008, 4:47am UTC](https://www.ruby-forum.com/t/help-with-background-rb-triggers/134790/1 "2008-04-15T04:47:04Z")

</div>

Hi,

I’m currently working with backgroundrb and need some help with workers  
triggers.

I have two app servers with the same rails application and one worker  
that executes every day at 00:00. In my backgroundrb config file I setup  
a memcache server for the results sharing, but the work is executing in  
both servers.

My problem is that i had the same job executing twice =(

How i can do a job that only run in only one machine per time? Can  
backgroundrb take aware of this and only run the worker in one machine?

Sorry my bad english,

Cheers!  
JosÃ© Antonio  
(from Chile)

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [April 19, 2008, 2:33am UTC](https://www.ruby-forum.com/t/help-with-background-rb-triggers/134790/2 "2008-04-19T02:33:43Z")

</div>

Finally i’m using the database for sync the process of all my servers  
running backgroundrb. I found intersting things in the “Quartz” project  
that backgroundrb could implement.

Cheers,  
JosÃ© Antonio

Jose Jsilva wrote:

> Hi,
> 
> I’m currently working with backgroundrb and need some help with workers  
> triggers.
> 
> I have two app servers with the same rails application and one worker  
> that executes every day at 00:00. In my backgroundrb config file I setup  
> a memcache server for the results sharing, but the work is executing in  
> both servers.
> 
> My problem is that i had the same job executing twice =(
> 
> How i can do a job that only run in only one machine per time? Can  
> backgroundrb take aware of this and only run the worker in one machine?
> 
> Sorry my bad english,
> 
> Cheers!  
> JosÃ© Antonio  
> (from Chile)
