laget.Quartz
1.2.61
Prefix Reserved
See the version list below for details.
dotnet add package laget.Quartz --version 1.2.61
NuGet\Install-Package laget.Quartz -Version 1.2.61
<PackageReference Include="laget.Quartz" Version="1.2.61" />
paket add laget.Quartz --version 1.2.61
#r "nuget: laget.Quartz, 1.2.61"
// Install laget.Quartz as a Cake Addin #addin nuget:?package=laget.Quartz&version=1.2.61 // Install laget.Quartz as a Cake Tool #tool nuget:?package=laget.Quartz&version=1.2.61
laget.Quartz
A generic implementation of Quartz, an open-source job scheduling system for .NET.
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 fromJob (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.Register<SomeJob>();
registrator.Register<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 | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.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. |
-
.NETStandard 2.0
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Quartz (>= 3.13.0)
- Serilog (>= 4.0.1)
-
.NETStandard 2.1
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Quartz (>= 3.13.0)
- Serilog (>= 4.0.1)
-
net6.0
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Quartz (>= 3.13.0)
- Serilog (>= 4.0.1)
-
net8.0
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Quartz (>= 3.13.0)
- Serilog (>= 4.0.1)
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.62 | 94 | 10/22/2024 |
1.2.61 | 149 | 9/3/2024 |
1.2.60 | 136 | 6/3/2024 |
1.2.59 | 154 | 4/5/2024 |
1.2.57 | 124 | 3/20/2024 |
1.2.56 | 248 | 3/4/2024 |
1.2.55 | 276 | 1/20/2024 |
1.2.53 | 112 | 1/20/2024 |
1.2.52 | 239 | 11/22/2023 |
1.2.51 | 183 | 9/4/2023 |
1.2.50 | 216 | 7/3/2023 |
1.2.49 | 199 | 7/3/2023 |
1.2.47 | 246 | 4/3/2023 |
1.2.46 | 281 | 3/10/2023 |
1.2.43 | 281 | 3/6/2023 |
1.2.41 | 310 | 2/6/2023 |
1.2.38 | 340 | 12/5/2022 |
1.2.37 | 414 | 10/3/2022 |
1.2.36 | 455 | 9/5/2022 |
1.2.33 | 464 | 6/7/2022 |
1.2.32 | 495 | 5/2/2022 |
1.2.29 | 479 | 4/4/2022 |
1.2.28 | 463 | 4/4/2022 |
1.2.27 | 492 | 3/7/2022 |
1.2.26 | 348 | 11/28/2021 |
1.2.25 | 395 | 11/1/2021 |
1.2.21 | 451 | 8/17/2021 |
1.2.18 | 441 | 5/21/2021 |
1.1.9 | 418 | 5/13/2021 |