src/Quartz.AspNetCore/README.md
Quartz.AspNetCore provides ASP.NET Core hosted service integration for Quartz.NET, running a scheduler that starts and stops with the application lifetime.
Tip: If you only need the generic host, Quartz.Extensions.Hosting may be enough.
dotnet add package Quartz.AspNetCore
Register the scheduler with AddQuartzServer:
services.AddQuartz(q =>
{
// scheduler, job and trigger configuration
});
services.AddQuartzServer(options =>
{
// wait for jobs to complete gracefully on shutdown
options.WaitForJobsToComplete = true;
});
See the Microsoft DI integration docs for configuring jobs and triggers.
On target frameworks with health check support, AddQuartzServer also registers an ASP.NET Core health check named quartz-scheduler that reports unhealthy when the scheduler is not running or cannot reach its store. Attach tags to filter it into separate liveness/readiness probes:
services.AddQuartzServer(
options => options.WaitForJobsToComplete = true,
healthCheckTags: ["ready", "live"]);
š Full documentation: https://www.quartz-scheduler.net/documentation/quartz-3.x/packages/aspnet-core-integration.html