Skip to content

adamfoneil/BackgroundService.Extensions

Repository files navigation

There are very mature libraries out there for background job processing such as Hangfire and Quartz.Net. My feeling at the moment, though, is that these libraries aren't as simple to use as I'd like. Also, I'm eager to make the most of .NET's built-in BackgroundService class, which is the springboard for this project. I've run into some gotchas with BackgroundService (namely unexpected app stoppage in IIS causing background jobs to stop unexpectedly), but I really like that BackgroundService is a .NET native feature.

For completeness' sake I should mention that you can also use Azure functions to add background job processing to your applications. (Not to mention other "serverless" cloud capability like AWS Lambda.) But the truth is I have not enjoyed working with Azure functions. I find them hard to debug and monitor, and they require a large context shift away from the rest of your application.

So, this library extends the BackgroundService class with:

Please see the Queue integration tests to see a simple usage in effect.

About

Specialty classes for .NET BackgroundService -- CronJob and SqlServerQueue

Topics

Resources

Stars

Watchers

Forks

Languages