# Are fire-and-forget tasks queued to a server

**URL:** <https://discuss.hangfire.io/t/are-fire-and-forget-tasks-queued-to-a-server/117>\
**Category:** question\
**Created:** [August 2, 2014, 2:22pm UTC](https://discuss.hangfire.io/t/are-fire-and-forget-tasks-queued-to-a-server/117 "2014-08-02T14:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sun21170](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sun21170](https://discuss.hangfire.io/u/sun21170)\
**Post date:** [August 2, 2014, 2:22pm UTC](https://discuss.hangfire.io/t/are-fire-and-forget-tasks-queued-to-a-server/117/1 "2014-08-02T14:22:23Z")

</div>

When I use the code below, is the task queued for execution at the Hangfire server Or it is executed immediately?  
I am still trying to understand how Hangfire works for fire-and-forget tasks.

```
BackgroundJob.Enqueue(() => DosomeLongTask());

```

---

<div class="post-metadata">

**Author:** ![sun21170](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sun21170](https://discuss.hangfire.io/u/sun21170)\
**Post date:** [August 2, 2014, 11:06pm UTC](https://discuss.hangfire.io/t/are-fire-and-forget-tasks-queued-to-a-server/117/2 "2014-08-02T23:06:53Z")

</div>

I found the answer. Its going to be queued. Everything in Hangfire gets queued.  
So, it may or may not execute immediately depending on how many requests are waiting in the queue from before.

---

<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 8, 2014, 12:22pm UTC](https://discuss.hangfire.io/t/are-fire-and-forget-tasks-queued-to-a-server/117/3 "2014-08-08T12:22:26Z")

</div>

Sorry for the delay. Yep, all jobs are being executed outside of the request processing pipeline. You can also lower the processing latency by using [`Hangfire.SqlServer.MSMQ`](https://www.nuget.org/packages/HangFire.SqlServer.MSMQ/) or [`Hangfire.Redis`](https://www.nuget.org/packages/HangFire.Redis/) packages.
