Recurring jobs wont run if no new request hits the site after App Pool Recycle

recurring
Tags: #<Tag:0x00007f6e43e72ff8>

#1

Hi All

On our server, we have 4 recurring jobs running around 9pm every night in the background.

The App Pool recycles every night at 2AM, and due to the nature of the website, over the weekends no new requests will hit the site after the app pool recyle at 2AM to 9PM.

And the jobs just won’t run at all in this case. The server has plenty of resources , in terms of CPU and memory to run the jobs.

The workaround for this , I guess , is to have a little auto-ping utility constantly running the background to wake up hangfire after a recycle but that feels Odd.

Alternatively, we could just keep the app pools running all the time and use a script recycle the app pool explicitly , along with warming up hangfire.

Has anyone come across this? Is there a solution?

Thanks


#2

Read the doc…

http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html