JobRunner.Quartz 2.0.1

dotnet add package JobRunner.Quartz --version 2.0.1
                    
NuGet\Install-Package JobRunner.Quartz -Version 2.0.1
                    
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="JobRunner.Quartz" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JobRunner.Quartz" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="JobRunner.Quartz" />
                    
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 JobRunner.Quartz --version 2.0.1
                    
#r "nuget: JobRunner.Quartz, 2.0.1"
                    
#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 JobRunner.Quartz@2.0.1
                    
#: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=JobRunner.Quartz&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=JobRunner.Quartz&version=2.0.1
                    
Install as a Cake Tool

JobRunner.Quartz

Реализация планировщика на основе Quartz.NET для JobRunner. Пакет зависит от JobRunner.Core

Реализует интерфейсы из Core:
- IJobScheduler
- IScheduleConverter (CronConverter)
- IExecutionScope (ExecutionScope)

Требования

.NET 10.0 (или совместимая версия)

Наличие реализаций (от JobRunner.Core): ITaskService<T> — хранилище задач IJobExecutor — исполнитель задач IEncryptionService — шифрование (опционально)

Установка

dotnet add package JobRunner.Quartz

Зависимости

JobRunner.Core — последняя версия (ориентируйтесь на момент 1.2.1 --> 1.2.1) Quartz.NET — 3.18.0 Microsoft.Extensions.DependencyInjection Microsoft.Extensions.Logging Microsoft.Extensions.Options

Быстрый старт

Большая необходимая часть документации описана в JobRunner.Core

Действия, которые нужно сделать после скачивания этого пакета:

  1. Зарегистрировать сервисы DI

    builder.Services.AddQuartzScheduler(); builder.Services.AddScoped<ITaskService<MyTask>, MyTaskService>(); builder.Services.AddScoped<IJobExecutor, MyJobExecutor>(); builder.Services.AddScoped<IEncryptionService, MyEncryptionService>();

  2. Инициализировать оркестратор при старте приложения

    using var scope = app.Services.CreateScope(); var orchestrator = scope.ServiceProvider.GetRequiredService<ITaskOrchestrator<MyTask>>(); await orchestrator.InitializeAsync();

  3. Инициализировать оркестратор

using var scope = app.Services.CreateScope(); var orchestrator = scope.ServiceProvider.GetRequiredService<ITaskOrchestrator<MyTask>>(); await orchestrator.InitializeAsync();

Для шифрования чувствительных аргументов (пароли, ключи, токены) необходимо реализовать IEncryptionService

JobLoggingListener (мониторинг выполнения)

При включении enableLoggingListener: true автоматически добавляется слушатель, который логирует ВСЕ события выполнения задач: До выполнения задачи → LogInformation("Job is about to be executed") После выполнения → LogInformation/LogError("Job completed/failed") При отмене (veto) → LogWarning("Job execution was vetoed") Время выполнения задачи → "Job took X ms"

Отключить слушатель: builder.Services.AddQuartzScheduler<MyJobTask, Guid>( enableLoggingListener: false);

Cron-валидация

Перед регистрацией задачи в Quartz, Cron-выражение автоматически валидируется. При невалидном выражении выбрасывается ArgumentException.

Методы для ручной валидации (JobRunner.Quartz.Extensions):

cronExpression.IsValidCron() → bool cronExpression.ValidateCron() → void (throws if invalid)

Дополнительные методы QuartzScheduler

QuartzScheduler предоставляет полезные методы для мониторинга: JobExistsAsync(TId taskId) → bool GetAllScheduledJobIdsAsync() → IReadOnlyList<TId> GetJobDetailAsync(TId taskId) → IJobDetail? GetTriggerAsync(TId taskId) → ITrigger?

Переопределение поведения

Если стандартная реализация не подходит:

Наследовать QuartzScheduler и переопределить методы Реализовать свой IScheduleConverter Создать свою реализацию IJobScheduler

последние изменения (v.2.0.1)

  1. Изменение логики работы с кварталами (1,2,3,4)
  2. Добавление расписания "список однократных выполнений"
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 142 7/24/2026
2.0.0 144 6/28/2026
1.3.0 135 6/26/2026
1.2.4 117 6/22/2026
1.2.3 120 6/19/2026
1.2.2 119 6/16/2026
1.2.1 114 6/16/2026
1.2.0 133 6/12/2026
1.1.0 121 6/8/2026
1.0.7 124 6/6/2026
1.0.6 116 6/2/2026
1.0.5 116 5/11/2026
1.0.4 118 5/9/2026
1.0.3 112 5/7/2026
1.0.2 139 4/28/2026
1.0.1 111 4/26/2026
1.0.0 114 4/26/2026