VOOZH about

URL: https://www.nuget.org/packages/Reddoxx.Quartz.MongoDbJobStore

⇱ NuGet Gallery | Reddoxx.Quartz.MongoDbJobStore 2.1.4




Reddoxx.Quartz.MongoDbJobStore 2.1.4

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Reddoxx.Quartz.MongoDbJobStore --version 2.1.4
 
 
NuGet\Install-Package Reddoxx.Quartz.MongoDbJobStore -Version 2.1.4
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Reddoxx.Quartz.MongoDbJobStore" Version="2.1.4" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Reddoxx.Quartz.MongoDbJobStore" Version="2.1.4" />
 
Directory.Packages.props
<PackageReference Include="Reddoxx.Quartz.MongoDbJobStore" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Reddoxx.Quartz.MongoDbJobStore --version 2.1.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Reddoxx.Quartz.MongoDbJobStore, 2.1.4"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Reddoxx.Quartz.MongoDbJobStore@2.1.4
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Reddoxx.Quartz.MongoDbJobStore&version=2.1.4
 
Install as a Cake Addin
#tool nuget:?package=Reddoxx.Quartz.MongoDbJobStore&version=2.1.4
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MongoDB Job Store for Quartz.NET

👁 NuGet Version

Fork of the awesome codebase of @glucaci with multiple tweaks:

  • Latest .net support
  • Quartz cluster support
  • DI-based configuration
  • Improved locking support

Limitations

  • Due to the nature of the DI-based approach multiple schedulers are not supported on the same host (SchedulerBuilder.Build()).
  • The locking mechanism has been rebuilt to use a SELECT FOR UPDATE approach, which requires transactions. So your MongoDb needs to run in a replica-set configuration. We also provide a way to use redis instead of mongodb transactions for locking (using the redlock algorithm).

Nuget

Install-Package Reddoxx.Quartz.MongoDbJobStore

Basic Usage

First, create your own QuartzMongoDbJobStoreFactory, which provides the a database-instance where your collection should be stored in. The JobStoreFactory itself also needs to be added to your DI-Container as it'll be resolved by the MongoDbJobStore later on.

internal class QuartzMongoDbJobStoreFactory : IQuartzMongoDbJobStoreFactory
{
 private const string LocalConnectionString = "mongodb://localhost/quartz";

 private readonly IMongoDatabase _database;

 public QuartzMongoDbJobStoreFactory()
 {
 var url = new MongoUrl(LocalConnectionString);
 var client = new MongoClient(url);

 _database = client.GetDatabase(url.DatabaseName);
 }

 public IMongoDatabase GetDatabase()
 {
 return _database;
 }
}

Next, register your QuartzMongoDbJobStoreFactory in your DI-Container:

 // Make your job store factory available to the MongoDbJobStore
 services.AddSingleton<IQuartzMongoDbJobStoreFactory, QuartzMongoDbJobStoreFactory>();

Then we can configure quartz for the host. Be sure to specify MongoDbJobStore in q.UsePersistentStore<MongoDbJobStore> as this registers the MongoDbJobStore singleton as well. storage.ConfigureMongoDb(c => ...) allows for further customization.

 services.AddQuartz(
 q =>
 {
 q.SchedulerId = "AUTO";

 q.UsePersistentStore<MongoDbJobStore>(
 storage =>
 {
 storage.UseClustering();
 storage.UseNewtonsoftJsonSerializer();
 
 // Your custom job store configuration
 storage.ConfigureMongoDb(
 c =>
 {
 // Configure your custom collection prefix
 c.CollectionPrefix = "CustomPrefix";
 }
 );
 }
 );
 }
 );

Use redlock for locking instead of mongodb transactions

Install-Package Reddoxx.Quartz.MongoDbJobStore.Redlock
 // Add the DistributedLocksQuartzLockingManager to your DI container
 services.AddSingleton<IQuartzJobStoreLockingManager, DistributedLocksQuartzLockingManager>();
Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Reddoxx.Quartz.MongoDbJobStore:

Package Downloads
Reddoxx.Quartz.MongoDbJobStore.Redlock

Redlock locking support for quartz-mongodb-job-store

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-rc1 1,647 10/28/2025
2.1.4 29,195 10/27/2025
2.1.3 297 10/21/2025
2.1.2 1,678 10/6/2025
2.1.1 7,375 7/28/2025
2.1.0 4,353 2/14/2025
2.0.0 10,666 11/19/2024
1.6.0 443 11/19/2024
1.5.0 4,278 9/13/2024
1.4.0 627 7/11/2024
1.3.0 5,621 5/23/2024
1.2.2 1,123 2/28/2024
1.2.1 247 2/26/2024
1.1.4 288 2/21/2024
1.1.2 303 2/13/2024
1.1.0 277 2/13/2024
1.0.0 272 2/2/2024