Forum Discussion
Deploy an application that uses BackgroundService on IIS
As the title suggests, I have a webapi project deployed on IIS. The project has a simple timed background task that needs to be executed in the early hours of the day. I used BackgroundService to develop this functionality, I checked the execution logs and found that this background task was not executed correctly during this time, the strange thing is that it is always triggered correctly in the development environment. Later I realized that it should be related to the Idle Time-out of the IIS application pool. In the early hours of the morning, my site is not visited, so the site should be “hibernated”, so my background task can not be triggered correctly.
I can only deploy the site using IIS, but I still need the background tasks, what should I do?