Background
When hosting a (non-Core) ASP.net site on IIS 8+ it is possible to utilize the IIS Application Initialization Module to pro-actively initialize ('warm-up') a web application when IIS starts up (or, I believe, when an app pool is recycled). As far as I know, this is not possible when hosting a .net Core app on IIS.
I have also noticed that when hosting a .net Core (1.1) app on IIS, the dotnet.exe
process (Kestrel) is killed as part of an application pool recycle event. This process is then only restarted when the first new request is made.
I'm asking the below questions because I am using Hangfire (Core) with a recurring background job and would like this job to still be executed when nobody is visiting the site for prolonged periods of time.
Questions
When hosting a Core app on IIS, is there any point in using the scheduled app pool recycle functionality? The only reference I could find for this was an issue on the Github repo.
If so, is it possible to automatically initialize a site or start Kestrel after a recycle of the app pool (normally this occurs every 29 hours by default).
IProcessHostPreloadClient
or equivalent in Core (that I know of). Given I have a 'relatively short and simple' task that needs to be run once a day, I will go with a scheduled task. – Credent