# Queuing one job cancels another?

**URL:** https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438
**Category:** bug?
**Tags:** recurring
**Created:** [March 7, 2018, 9:59pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438 "2018-03-07T21:59:32Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 9:59pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/1 "2018-03-07T21:59:32Z")

</div>

I have 7 recurring Hangfire jobs running in production. When I try to deploy an 8th, the 7th of the seven previous jobs disappears. When I try to redeploy the one that disappeared, the 8th one disappears instead. Every time I deploy one, it cancels the others. Is there a limit I’m not aware of? Thanks.

---

<div class="post-metadata">

### Author: ![pieceofsummer](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/pieceofsummer/32/785_2.png) [@pieceofsummer](https://discuss.hangfire.io/u/pieceofsummer)
#### Post date: [March 7, 2018, 10:16pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/2 "2018-03-07T22:16:38Z")

</div>

Seven is a limitation of a free version (just kidding 🙂)

Check if your recurring jobs use different identifiers for jobs. If you call AddOrUpdate with the same identifier, it will replace recurring job definition. If you’re not explicitly specifying recurring job identifier, it only takes class and method name into account when auto-generating one, so the same job method with different arguments will replace existing recurring job.

---

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 10:23pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/3 "2018-03-07T22:23:05Z")

</div>

Thank you for the prompt reply! That’s funny, I was wondering if indeed it was a freeware limit – glad it’s not 😊

I am using identifiers as far as I know; one is called “WFFtp” and the other is called “SilkRoad”. That’s how I can tell when one disappears. They are likewise using different Queues. They are both using the same Hangfire SQL tables, though, and are deployed on the same server. Can you think of anything else that might cause that behavior?

---

<div class="post-metadata">

### Author: ![pieceofsummer](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/pieceofsummer/32/785_2.png) [@pieceofsummer](https://discuss.hangfire.io/u/pieceofsummer)
#### Post date: [March 7, 2018, 10:27pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/4 "2018-03-07T22:27:21Z")

</div>

Please show how you’re adding those recurring jobs. And are you 100% sure you’re not accidentally calling RemoveIfExists at some point?

---

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 10:30pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/5 "2018-03-07T22:30:45Z")

</div>

Correct, I am only calling `AddOrUpdate`. Here’s the code from each Startup.cs file (using OWIN):

#1:

`RecurringJob.AddOrUpdate<FtpJob>("WFFtp", x => x.DownloadFtpFiles(_jobConfig), _jobInterval);`

#2:

`RecurringJob.AddOrUpdate<SilkRoadJob>("SilkRoad", x => x.RunSilkRoadJob(_jobConfig), Cron.MinuteInterval(5));`

Both are using their own HangfireBootstrapper class + ApplicationPreload setup in IIS to enable the always running component.

---

<div class="post-metadata">

### Author: ![pieceofsummer](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/pieceofsummer/32/785_2.png) [@pieceofsummer](https://discuss.hangfire.io/u/pieceofsummer)
#### Post date: [March 7, 2018, 10:35pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/6 "2018-03-07T22:35:57Z")

</div>

So they’re scheduled by multiple IIS sites?

You’ve said you have 8 recurring jobs. That is two of them. What are the other 6?

---

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 10:38pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/7 "2018-03-07T22:38:09Z")

</div>

Correct, multiple sites in IIS–all on the same server.

The other 6 do not seem to be affected by this at all. They are likewise six separate sites in IIS. They’ve been operational for over a year, no issues. These last two jobs I’ve only added within the last two weeks.

---

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 10:42pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/8 "2018-03-07T22:42:24Z")

</div>

OMG I’m so sorry. Please close this ticket. I just realized those 6 jobs are running in two places – in test environment, and in production environment. Those two new jobs – one is test, and the other is production. THAT’S WHY THEY DON’T SHOW UP IN SAME DASHBOARD!! So sorry. Problem between chair and keyboard. 😖

---

<div class="post-metadata">

### Author: ![unionthugface](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/unionthugface/32/1254_2.png) [@unionthugface](https://discuss.hangfire.io/u/unionthugface)
#### Post date: [March 7, 2018, 10:43pm UTC](https://discuss.hangfire.io/t/queuing-one-job-cancels-another/4438/9 "2018-03-07T22:43:14Z")

</div>

I love Hangfire by the way! Keep up the great work. So sorry to trouble you.
