Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Do background workers only fire when requests to the site are made? #9210


User avatar
0
marble68 created

8.7 - jquery version - IIS 10

I setup a background worker and everything works fine, except it doesn't fire when the site is idle.

I have my app pool idle set to 0, and start mode to "Always Running".

I was expecting an email this morning and didn't receive it.

I went to the site and immediately got the email.

So background workers only fire when a request is made to the website - or is it something else?

Should I be using hangfire?

Or should I just create a windows service / console application to do these jobs?


2 Answer(s)
  • User Avatar
    0
    marble68 created

    I've followed these instructions for ensuring my app pool doesn't quit.

    https://weblog.west-wind.com/posts/2013/oct/02/use-iis-application-initialization-for-keeping-aspnet-apps-alive

  • User Avatar
    0
    robert created
    Support Team

    Hi marble68,

    Please check the following documentation:

    https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration