# Production & Staging Timers

**URL:** <https://community.convox.com/t/production-staging-timers/621>\
**Category:** Configuration\
**Created:** [October 3, 2019, 6:40pm UTC](https://community.convox.com/t/production-staging-timers/621 "2019-10-03T18:40:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moises](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/moises/32/97_2.png) [@moises](https://community.convox.com/u/moises)\
**Post date:** [October 3, 2019, 6:40pm UTC](https://community.convox.com/t/production-staging-timers/621/1 "2019-10-03T18:40:31Z")

</div>

I have two stacks: production and staging. Both have the same exact **codebase** and use the same `convox.yml`.

If I setup a cron job (aka [Timers](https://docs.convox.com/application/timers)) and both racks have the same `convox.yml` I will have the exact same cron job running twice. This is something that I do not want to happen.

Is there a way to prevent this without having to remove manually the timer from the `convox.yml` from my staging branch and then adding back the timer to `convox.yml` when merging to the production branch?

Any idea/solution would be much appreciated.

---

<div class="post-metadata">

**Author:** ![julian](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/julian/32/35_2.png) [@julian](https://community.convox.com/u/julian)\
**Post date:** [October 3, 2019, 10:09pm UTC](https://community.convox.com/t/production-staging-timers/621/2 "2019-10-03T22:09:51Z")

</div>

I don’t know if this is an option for you but what we do currently is call our application code from the cron job and the code exits early of it is not running in the correct environment. I’d definitely be interested in a better solution though.

---

<div class="post-metadata">

**Author:** ![moises](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/moises/32/97_2.png) [@moises](https://community.convox.com/u/moises)\
**Post date:** [October 7, 2019, 2:45am UTC](https://community.convox.com/t/production-staging-timers/621/3 "2019-10-07T02:45:25Z")

</div>

@julian I’m stuck in trying to get my timer running, I opened this topic [Timer not found](https://community.convox.com/t/timer-not-found/624). Do you know what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![ed\_convox](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ed_convox/32/101_2.png) [@ed\_convox](https://community.convox.com/u/ed_convox)\
**Post date:** [October 7, 2019, 9:31am UTC](https://community.convox.com/t/production-staging-timers/621/4 "2019-10-07T09:31:56Z")

</div>

Yeah, if you want to have differences between your environments like that, because your timers are affecting the same things or whatever, you could introduce checks based on the `RACK` env var to determine whether to run.
