laget.Quartz 1.2.59

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package laget.Quartz --version 1.2.59
NuGet\Install-Package laget.Quartz -Version 1.2.59
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="laget.Quartz" Version="1.2.59" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add laget.Quartz --version 1.2.59
#r "nuget: laget.Quartz, 1.2.59"
#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.
// Install laget.Quartz as a Cake Addin
#addin nuget:?package=laget.Quartz&version=1.2.59

// Install laget.Quartz as a Cake Tool
#tool nuget:?package=laget.Quartz&version=1.2.59

laget.Quartz

A generic implementation of Quartz, an open-source job scheduling system for .NET.

Nuget Nuget

Configuration

This implementation requires Autofac since this is the Inversion of Control container of our choosing.

Usage

Simple

This will by default register all jobs from the calling assembly.

await Host.CreateDefaultBuilder()
    .ConfigureContainer<ContainerBuilder>((context, builder) =>
    {
        builder.RegisterQuartzJobs();
        builder.RegisterQuartzService();
    })
    .ConfigureServices((context, services) =>
    {
        services.AddQuartzService();
    })
    .Build()
    .RunAsync();

Advanced

await Host.CreateDefaultBuilder()
    .ConfigureContainer<ContainerBuilder>((context, builder) =>
    {
        builder.RegisterQuartzJobs(_ =>
        {
            _.Assembly("name");
            _.Register<Job>();
            _.TheCallingAssembly();
            _.TheEntryAssembly();
            _.TheExecutingAssembly();
        });
        builder.RegisterQuartzService(new NameValueCollection
        {
            { "quartz.serializer.type", "binary" },
            { "quartz.scheduler.instanceName", "ThisIsAnInstance" },
            { "quartz.jobStore.type", "Quartz.Simpl.RAMJobStore, Quartz" },
            { "quartz.threadPool.threadCount", "4" }
        });
    })
    .ConfigureServices((context, services) =>
    {
        services.AddQuartzService();
    })
    .Build()
    .RunAsync();

This is the advanced and more customizable way to register your mappers

  • Assembly("name");

    This will register the job from the assembly, will load assembly via the name provided using System.Reflection, that inherits from Job (laget.Quartz.Job).

  • Register<T>();

    This will register the job that inherits from Job (laget.Quartz.Job).

  • TheCallingAssembly();

    This will register the job from the calling assembly that inherits from Job (laget.Quartz.Job).

  • TheEntryAssembly();

    This will register the job from the entry assembly that inherits from Job (laget.Quartz.Job).

  • TheExecutingAssembly();

    This will register the job from the executing assembly that inherits from Job (laget.Quartz.Job).

For a full configuration reference, please take a look at here!

Modules

await Host.CreateDefaultBuilder()
    .ConfigureContainer<ContainerBuilder>((context, builder) =>
    {
        builder.RegisterQuartzJobs(_ =>
        {
            _.RegisterModule<UserModule>();
        });
        builder.RegisterQuartzService();
    })
    .ConfigureServices((context, services) =>
    {
        services.AddQuartzService();
    })
    .Build()
    .RunAsync();
public class OrderModule : Module
{
    public override void Configure(IRegistrator registrator)
    {
        registrator.AddJob<SomeJob>();
        registrator.AddJob<AnotherJob>();
    }
}
Job
[DisallowConcurrentExecution]
public class SomeJob : laget.Quartz.Job
{
    private readonly ISomeService _someService;

    // We need this empty constructor as it's used when scheduling the job
    public SomeJob()
    {
    }

    public SomeJob(ISomeService someService)
    {
        _someService = someService;
    }

    public override async Task ExecuteJob(IJobExecutionContext context)
    {
        // Do some stuff here!
    }


    public override ITrigger Trigger => TriggerBuilder
        .Create()
        .StartNow()
        .WithIdentity(Name, Group)
        .WithSimpleSchedule(x => x
            .WithInterval(Interval)
            .WithMisfireHandlingInstructionIgnoreMisfires()
            .RepeatForever()
        )
        .Build();

    private static TimeSpan Interval => TimeSpan.FromSeconds(60);
    public override string Group => "Group";
    public override string Name => nameof(SomeJob);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.2.59 111 4/5/2024
1.2.57 91 3/20/2024
1.2.56 213 3/4/2024
1.2.55 228 1/20/2024
1.2.53 75 1/20/2024
1.2.52 204 11/22/2023
1.2.51 149 9/4/2023
1.2.50 183 7/3/2023
1.2.49 167 7/3/2023
1.2.47 206 4/3/2023
1.2.46 246 3/10/2023
1.2.43 247 3/6/2023
1.2.41 273 2/6/2023
1.2.38 300 12/5/2022
1.2.37 369 10/3/2022
1.2.36 409 9/5/2022
1.2.33 420 6/7/2022
1.2.32 447 5/2/2022
1.2.29 435 4/4/2022
1.2.28 415 4/4/2022
1.2.27 442 3/7/2022
1.2.26 303 11/28/2021
1.2.25 354 11/1/2021
1.2.21 402 8/17/2021
1.2.18 395 5/21/2021
1.1.9 375 5/13/2021