Creating a Quartz.NET hosted service with ASP.NET Core

added by DotNetKicks
5/21/2019 10:29:22 AM

1 Kicks, 162 Views

In this post I describe how to run Quartz.NET jobs using an ASP.NET Core hosted service. I show how to create a simple IJob, a custom IJobFactory, and a QuartzHostedService that runs jobs while your application is running. I'll also touch on some of the issues to aware of, namely of using scoped services inside singleton classes.