I'm trying to get my head around using hangfire with a .net core web app. The examples seem simple enough, however I have questions.
If I want to run a job on a cron schedule, even if the iis app pool is asleep, shouldn't I consider putting the hangfire server in a windows service?
If using both the server and the client in the web app, the documentation mentions to modify the root .net config file to allow your app to be always running. http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html
Why can't you simply set the app pool timeout to 0 instead?
The other option is to put the hangfire server as part of a windows service project. I'd rather not mess with a windows service if its not really needed. That need being that to run a scheduled job (via a cron schedule) to execute, even if no users are making requests to the app to prevent the app pool from going to sleep. Setting the app pool idle timeout should do the same thing should it not?
You should never expect a website to run an extended job like that. They're designed to run quick (ish) calls and actions and return results. The suggestion is to use a Windows Service. As soon as you start messing with App Pool timeouts etc, you're asking for trouble.
I can revise this answer now with the release of Net Core 2.2. MS have added in a "Background Task" service which allows stuff to run on the server while the server is active: