# Using Hangfire for Cron Jobs

**URL:** <https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604>\
**Category:** question\
**Created:** [December 7, 2015, 4:52pm UTC](https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604 "2015-12-07T16:52:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcoker](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bcoker](https://discuss.hangfire.io/u/bcoker)\
**Post date:** [December 7, 2015, 4:52pm UTC](https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604/1 "2015-12-07T16:52:52Z")

</div>

I have a question. I need to use Hangfire to run recurring jobs. However, as I understand it, if I put Hangfire in a web app, the background server will not run until I actually launch the web app in a browser. That will not work for me, since I need the background server to run without user intervention. So, I am thinking about using a Windows service with Hangfire. If I do that, can I still get to the Hangfire portal to see jobs that have run or do I need to have a separate web app that will display the portal ? If I do that will the web app and the Windows service both try and launch jobs independently ?

---

<div class="post-metadata">

**Author:** ![gandarez](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/gandarez/32/470_2.png) [@gandarez](https://discuss.hangfire.io/u/gandarez)\
**Post date:** [December 7, 2015, 11:57pm UTC](https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604/2 "2015-12-07T23:57:26Z")

</div>

You can do it absolutely.

Please take a look at the documentation [http://docs.hangfire.io/en/latest/background-processing/index.html](http://docs.hangfire.io/en/latest/background-processing/index.html)

---

<div class="post-metadata">

**Author:** ![bcoker](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@bcoker](https://discuss.hangfire.io/u/bcoker)\
**Post date:** [December 8, 2015, 12:23am UTC](https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604/3 "2015-12-08T00:23:30Z")

</div>

I read the documentation. I am going to have a main Hangfire Windows service. Here is my main question: do I need to create a separate Web app to host the Hangfire web portal ? I would assume that this portal will not do any scheduling of jobs, but just have a DB connection to the Hangfire SQL database and show the Hangfire portal.

---

<div class="post-metadata">

**Author:** ![gandarez](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/gandarez/32/470_2.png) [@gandarez](https://discuss.hangfire.io/u/gandarez)\
**Post date:** [December 8, 2015, 1:09pm UTC](https://discuss.hangfire.io/t/using-hangfire-for-cron-jobs/1604/4 "2015-12-08T13:09:48Z")

</div>

> [@bcoker](#):
>
> do I need to create a separate Web app to host the Hangfire web portal ?

No! Server and Dashborad runs independently.
