Background Tasks Without a Separate Service: Hangfire for ASP.NET
If you’re a web developer, eventually you’ll need to do some background processing. This has often meant running separate daemons, services, or Cron jobs, potentially complicating your integration and deployment. With Hangfire, you can create background tasks that run right inside the same .NET or .NET Core application. Hangfire background tasks can scale easily to multiple servers and can use a variety of durable storage options. You even get a monitoring UI right out of the box. In this session, we’ll look at the basics of setting up Hangfire, and how to perform fire-and-forget, delayed, recurring, and continuations of background tasks. We’ll also look at possible gotchas: debugging, failed jobs, cloud deployment.