JorgeCostaMacia.Quartz
8.0.0
Prefix Reserved
dotnet add package JorgeCostaMacia.Quartz --version 8.0.0
NuGet\Install-Package JorgeCostaMacia.Quartz -Version 8.0.0
<PackageReference Include="JorgeCostaMacia.Quartz" Version="8.0.0" />
<PackageVersion Include="JorgeCostaMacia.Quartz" Version="8.0.0" />
<PackageReference Include="JorgeCostaMacia.Quartz" />
paket add JorgeCostaMacia.Quartz --version 8.0.0
#r "nuget: JorgeCostaMacia.Quartz, 8.0.0"
#:package JorgeCostaMacia.Quartz@8.0.0
#addin nuget:?package=JorgeCostaMacia.Quartz&version=8.0.0
#tool nuget:?package=JorgeCostaMacia.Quartz&version=8.0.0
JorgeCostaMacia.Quartz
Quartz job-execution trace correlation: JobTrace get-or-creates the AggregateId/CorrelationId pair on the execution context, so every observer of the same execution — log listeners, event publishers, the job itself — shares the same identifiers regardless of who runs first.
And the clustered Postgres store every host in the family repeats, as one IQuartzBuilder extension.
Install
dotnet add package JorgeCostaMacia.Quartz
Usage
using JorgeCostaMacia.Quartz.Domain;
// In ANY observer of the execution (a listener, the job itself):
JobTrace trace = JobTrace.GetOrCreate(context); // reads the pair, minting + storing it if absent
await bus.Publish(new JobCompletedEvent(..., trace.AggregateId, trace.CorrelationId));
GetOrCreate is idempotent: the first caller mints the pair (time-ordered UUIDv7s) and puts it on the firing's own MergedJobDataMap; every later caller reads the same values. There is no registration-order contract between listeners — the keys and the get-or-create logic live once, here, instead of being re-implemented per listener per service.
For observers without an execution context (e.g. a trigger misfire), JobTrace.Create() mints a fresh, unshared pair.
The store configuration
using JorgeCostaMacia.Quartz.Infrastructure;
builder.Services.AddQuartz(quartz => quartz.WithPostgresDefaults("retry", "JobsBus", "bus"));
WithPostgresDefaults() is an extension on IQuartzBuilder, not an Add… facade: your AddQuartz call stays in your Program, so what the host composes is visible where it happens. It applies the machine name as the instance id, a simple type loader, and the ADO store on Postgres with clustering, job data stored as strings, and the System.Text.Json serializer.
The three arguments are the only things that differ between hosts: the scheduler's name, the name of the connection string (Quartz resolves it from ConnectionStrings, and a name that does not resolve fails the scheduler's start with a SchedulerConfigException naming it), and the schema holding the store tables — without the trailing dot, which is appended for you.
One requirement this package cannot declare: Quartz resolves its ADO provider by name at runtime, so your host must reference Npgsql itself. This package depends on Quartz alone — a consumer that only wants JobTrace should not pull in a database driver — and a host that forgets fails at startup with ArgumentException: Error while reading metadata information for provider 'Npgsql'.
That last one is Quartz's TablePrefix, and it replaces the QRTZ_ default rather than adding to it: with bus the store reads bus.TRIGGERS and bus.JOB_DETAILS, not bus.QRTZ_TRIGGERS.
Requirements
The .NET 10 SDK.
Depends on Quartz.
About
JorgeCostaMacia.Quartz is part of shared-net — a set of foundational, self-contained .NET packages, each scoped to a single concern and reusable across your bounded contexts.
- Repository: github.com/JorgeCostaMacia/shared-net
- Issues & requests: open an issue
- Contributing: CONTRIBUTING.md
- Security: report a vulnerability
Author: Jorge Costa Maciá
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Quartz (>= 4.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JorgeCostaMacia.Quartz:
| Package | Downloads |
|---|---|
|
JorgeCostaMacia.Quartz.Serilog
Serilog observability for Quartz — job and trigger log listeners that emit fixed low-cardinality messages enriched through the log context (scheduler, job, trigger, data, times, trace identifiers) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0 | 53 | 9/15/2026 |
| 7.2.1 | 85 | 9/14/2026 |
| 7.2.0 | 90 | 9/14/2026 |
| 7.1.1 | 91 | 9/13/2026 |
| 7.1.0 | 90 | 9/13/2026 |
| 7.0.1 | 101 | 9/10/2026 |
| 7.0.0 | 94 | 9/10/2026 |
| 6.0.6 | 111 | 9/9/2026 |
| 6.0.5 | 113 | 8/31/2026 |
| 6.0.4 | 151 | 7/22/2026 |
| 6.0.3 | 119 | 7/22/2026 |
| 6.0.2 | 125 | 7/19/2026 |
| 6.0.1 | 138 | 7/15/2026 |
| 6.0.0 | 119 | 7/13/2026 |
| 5.0.0 | 130 | 7/12/2026 |
| 4.3.0 | 118 | 7/12/2026 |
| 4.2.0 | 138 | 7/11/2026 |
| 4.1.0 | 128 | 7/10/2026 |