Rystem.BackgroundJob 6.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.BackgroundJob --version 6.1.0                
NuGet\Install-Package Rystem.BackgroundJob -Version 6.1.0                
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="Rystem.BackgroundJob" Version="6.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rystem.BackgroundJob --version 6.1.0                
#r "nuget: Rystem.BackgroundJob, 6.1.0"                
#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 Rystem.BackgroundJob as a Cake Addin
#addin nuget:?package=Rystem.BackgroundJob&version=6.1.0

// Install Rystem.BackgroundJob as a Cake Tool
#tool nuget:?package=Rystem.BackgroundJob&version=6.1.0                

Background job

Background job is a library that helps to create a background thread in your application (webapp or similar). With the dependency injection pattern, you may set che CRON value (when your job has to run), link to create CRON. You may set to true the RunImmediately if you want to run one time during your bootstrap. You may set the Key to allow the possibility to have more than one job with the same class on the same instance.

builder.Services.AddBackgroundJob<BackgroundJob>(
    x =>
    {
        x.Cron = "*/1 * * * *";
        x.RunImmediately = true;
        x.Key = "alzo";
    });

Your class BackgroundJob has to extend IBackgrounJob and you may warm up it during the bootstrap.

var app = builder.Build();
await app.Services.WarmUpAsync();

In IBackgroundJob you have ActionToDoAsync, it's the main method, called when the cron is fired; and OnException to catch the possibile exception during the main method run.

Product Compatible and additional computed target framework versions.
.NET 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. 
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 Rystem.BackgroundJob:

Package Downloads
Rystem.Queue

Rystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.4 21,316 12/23/2024
9.0.3 80 12/22/2024
9.0.2 10,634 12/21/2024
9.0.1 1,132 12/21/2024
9.0.0 172,936 11/16/2024
9.0.0-rc.1 77 10/18/2024
6.2.0 219,052 10/9/2024
6.1.1 111 10/9/2024
6.1.0 47,879 9/29/2024
6.0.24 149 9/11/2024
6.0.23 134 7/18/2024
6.0.21 130 6/18/2024
6.0.20 137 6/16/2024
6.0.19 131 6/14/2024
6.0.18 115 6/14/2024
6.0.17 120 6/14/2024
6.0.16 123 6/10/2024
6.0.15 119 6/9/2024
6.0.14 152 5/24/2024
6.0.13 135 5/23/2024
6.0.12 119 5/23/2024
6.0.11 132 5/20/2024
6.0.9 136 5/20/2024
6.0.7 121 5/18/2024
6.0.6 96 5/10/2024
6.0.5 106 5/10/2024
6.0.4 148 4/3/2024
6.0.3 302 3/25/2024
6.0.2 2,557 3/11/2024
6.0.1 183 3/8/2024
6.0.0 565 11/21/2023
6.0.0-rc.6 108 10/25/2023
6.0.0-rc.5 86 10/25/2023
6.0.0-rc.4 75 10/23/2023
6.0.0-rc.3 70 10/19/2023
6.0.0-rc.2 75 10/18/2023
6.0.0-rc.1 76 10/16/2023
5.0.20 736 9/25/2023
5.0.19 1,310 9/10/2023
5.0.18 540 9/6/2023
5.0.17 524 9/6/2023
5.0.16 517 9/5/2023
5.0.15 505 9/5/2023
5.0.14 545 9/5/2023
5.0.13 660 9/1/2023
5.0.12 502 8/31/2023
5.0.11 496 8/30/2023
5.0.10 540 8/29/2023
5.0.9 525 8/24/2023
5.0.8 521 8/24/2023
5.0.7 511 8/23/2023
5.0.6 538 8/21/2023
5.0.5 527 8/21/2023
5.0.4 546 8/16/2023
5.0.3 627 8/2/2023
5.0.2 602 8/2/2023
5.0.1 658 8/1/2023
5.0.0 630 7/31/2023
4.1.26 978 7/20/2023
4.1.25 629 7/16/2023
4.1.24 722 6/13/2023
4.1.23 612 6/13/2023
4.1.22 592 5/30/2023
4.1.21 620 5/20/2023
4.1.20 315,815 4/19/2023
4.1.19 95,325 3/20/2023
4.1.18 706 3/20/2023
4.1.17 693 3/16/2023
4.1.16 681 3/16/2023
4.1.15 1,143 3/15/2023
4.1.14 1,808 3/9/2023
4.1.13 654 3/7/2023
4.1.12 731 2/10/2023
4.1.11 751 1/26/2023
4.1.10 758 1/22/2023
4.1.9 763 1/20/2023
4.1.8 768 1/18/2023
4.1.7 784 1/18/2023
4.1.6 766 1/17/2023
4.1.1 757 1/4/2023
4.1.0 773 12/30/2022
3.0.25 863 12/21/2022
3.0.24 869 11/18/2022
3.0.23 863 11/18/2022
3.0.22 885 11/15/2022
3.0.21 855 11/14/2022
3.0.20 880 11/13/2022
3.0.19 904 11/2/2022
3.0.18 888 11/2/2022
3.0.17 950 10/29/2022
3.0.16 942 10/29/2022
3.0.15 930 10/29/2022
2.0.6 971 9/20/2022
2.0.5 960 9/20/2022
2.0.4 875 9/20/2022
2.0.3 1,014 9/20/2022
2.0.1 1,076 9/13/2022
2.0.0 887 8/19/2022
1.1.23 1,131 7/30/2022
1.1.22 1,019 7/29/2022
1.1.21 975 7/29/2022
1.1.20 1,027 7/29/2022
1.1.19 1,052 7/27/2022
1.1.17 977 7/27/2022
1.1.15 999 7/25/2022
1.1.14 1,008 7/25/2022
1.1.13 962 7/22/2022
1.1.12 1,002 7/19/2022
1.1.11 1,015 7/19/2022
1.1.10 1,005 7/19/2022
1.1.9 1,021 7/19/2022
1.1.8 1,004 7/18/2022
1.1.7 996 7/18/2022
1.1.6 995 7/18/2022
1.0.4 1,025 7/17/2022
1.0.2 1,069 7/17/2022
1.0.1 906 7/12/2022
1.0.0 1,287 7/8/2022
0.10.7 1,062 7/8/2022
0.9.11 1,028 6/30/2022
0.9.10 977 6/29/2022
0.9.9 993 6/28/2022