ASP.NET Core Setup for always running and auto startup


#1

I know there’s documentation on how to get hangfire to always run for previous versions of .Net here: http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html.

Do you have an example or documentation on how to accomplish this in ASP.NET Core RTM? I need hangfire to automatically start, stay running all the time, and process background jobs regardless of whether there are any requests made to the website. I’m running an ASP.NET Core RTM 1.0.0 MC6/EF7 site with AnglarJS using hangfire 1.6.0. Thanks!


#2

That doc (and the problem in general) is really more about IIS than it is about ASP.NET or Hangfire.
Does anything in the “If nothing works for you…” section apply to you?

If you have control of your server, I would just register your app as a service in the operating system - Then it’s always running. (Linux init system or NSSM for a Windows service - That’s what I’m doing.) IMHO, one of the biggest advantages of Core is that you can run it on Kestrel and free yourself from IIS.


#3

Is there any further guidance on this? I have the same requirement.


#4

I have the same question, do we have any solutions for this? Thanks


#5

Take a look here

I am going to try to get this going on aws elastic beanstalk.