Quartz.NET – Complete Guide with Code Samples
Quartz.NET is a powerful, open-source job scheduling library for .NET. It provides a robust framework for executing background tasks, ranging from simple recurring jobs to complex distributed workflows with clustering and persistence. This article compiles key concepts, capabilities, and code samples into one place. Setup – .NET Generic Host + Quartz using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using Quartz; using Quartz.Spi; var builder = Host.CreateDefaultBuilder(args) .ConfigureServices((hostContext, services) => { services.AddQuartz(q => { q.SchedulerId = "Scheduler-Core"; q.UseMicrosoftDependencyInjectionJobFactory(); q.AddJob<EmailReminderJob>(opts => opts.WithIdentity("EmailReminderJob").StoreDurably()); ...