# Job is stucking in enqueue state

**URL:** <https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350>\
**Category:** moved to github\
**Tags:** redis, queues\
**Created:** [August 23, 2016, 9:17am UTC](https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350 "2016-08-23T09:17:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdulbasit](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@abdulbasit](https://discuss.hangfire.io/u/abdulbasit)\
**Post date:** [August 23, 2016, 9:17am UTC](https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350/1 "2016-08-23T09:17:22Z")

</div>

I have added a job in enqueue and it is stucking there. I am using redis as storage. When I requeue from dashboard it processed the job successfully. Kinldy help in this regard.

 ![](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/1X/babfb0304e5b7af4f5c718a3d1d67e05b18e8565.png) ![](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/1X/e8bfd0963782d868714079a618b4b85c5caa3846.png)

---

<div class="post-metadata">

**Author:** ![KeithBarrows](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/keithbarrows/32/725_2.png) [@KeithBarrows](https://discuss.hangfire.io/u/KeithBarrows)\
**Post date:** [August 25, 2016, 11:34pm UTC](https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350/2 "2016-08-25T23:34:14Z")

</div>

I am having the same problem It appears, when resolved from Unity and then sent to a Queue that it ALWAYS defaults to the DEFAULT QUEUE even when marked with another queue. You can see my code at:

[http://hangfire.discourse.group/t/jobs-in-enqueue-state-most-never-run-sql-only/2367](http://hangfire.discourse.group/t/jobs-in-enqueue-state-most-never-run-sql-only/2367)

After running it appears stuck in the default queue:

 ![](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/1X/c396cbe720d12f441ddbae230cc5579dad01ad22.PNG)

I do the same as @abdulbasit (Requeue via dashboard) and it runs:

 ![](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/1X/4fa7723ca3061623ff1c987264762c7fa252b4db.PNG)

This is driving me nuts! 🙂

---

<div class="post-metadata">

**Author:** ![odinserj](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/odinserj/32/648_2.png) [@odinserj](https://discuss.hangfire.io/u/odinserj)\
**Post date:** [August 30, 2016, 4:54pm UTC](https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350/3 "2016-08-30T16:54:17Z")

</div>

@abdulbasit, **never** use the following construct, as it even does not make any sense, because of unnecessary creation of the `Job` class instance.

```auto
// Don't do this at home
var job = new Job();
BackgroundJob.Enqueue(() => job.Execute());

```

if you are using instance methods, always use the `.Enqueue<T>` method overloads:

```auto
// This is for instance methods
/// Place [Queue] attribute to the IJob.Execute method
BackgroundJob.Enqueue<IJob>(x => x.Execute("payload"));

// This is for static methods
BackgroundJob.Enqueue(() => Program.Main());

```

---

<div class="post-metadata">

**Author:** ![odinserj](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/odinserj/32/648_2.png) [@odinserj](https://discuss.hangfire.io/u/odinserj)\
**Post date:** [August 31, 2016, 9:39am UTC](https://discuss.hangfire.io/t/job-is-stucking-in-enqueue-state/2350/4 "2016-08-31T09:39:08Z")

</div>

Reported to GitHub, please GitHub issues to discuss the bug, and this topic for other discussions.

> <https://github.com/HangfireIO/Hangfire/issues/656>
