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.0 54,026 11/16/2024
9.0.0-rc.1 76 10/18/2024
6.2.0 218,992 10/9/2024
6.1.1 105 10/9/2024
6.1.0 47,871 9/29/2024
6.0.24 143 9/11/2024
6.0.23 125 7/18/2024
6.0.21 123 6/18/2024
6.0.20 129 6/16/2024
6.0.19 123 6/14/2024
6.0.18 109 6/14/2024
6.0.17 115 6/14/2024
6.0.16 118 6/10/2024
6.0.15 112 6/9/2024
6.0.14 147 5/24/2024
6.0.13 128 5/23/2024
6.0.12 114 5/23/2024
6.0.11 123 5/20/2024
6.0.9 131 5/20/2024
6.0.7 116 5/18/2024
6.0.6 91 5/10/2024
6.0.5 99 5/10/2024
6.0.4 145 4/3/2024
6.0.3 295 3/25/2024
6.0.2 2,437 3/11/2024
6.0.1 180 3/8/2024
6.0.0 562 11/21/2023
6.0.0-rc.6 105 10/25/2023
6.0.0-rc.5 83 10/25/2023
6.0.0-rc.4 72 10/23/2023
6.0.0-rc.3 67 10/19/2023
6.0.0-rc.2 74 10/18/2023
6.0.0-rc.1 75 10/16/2023
5.0.20 728 9/25/2023
5.0.19 1,308 9/10/2023
5.0.18 538 9/6/2023
5.0.17 522 9/6/2023
5.0.16 515 9/5/2023
5.0.15 502 9/5/2023
5.0.14 542 9/5/2023
5.0.13 658 9/1/2023
5.0.12 498 8/31/2023
5.0.11 494 8/30/2023
5.0.10 538 8/29/2023
5.0.9 523 8/24/2023
5.0.8 518 8/24/2023
5.0.7 508 8/23/2023
5.0.6 536 8/21/2023
5.0.5 525 8/21/2023
5.0.4 543 8/16/2023
5.0.3 625 8/2/2023
5.0.2 600 8/2/2023
5.0.1 656 8/1/2023
5.0.0 627 7/31/2023
4.1.26 975 7/20/2023
4.1.25 626 7/16/2023
4.1.24 719 6/13/2023
4.1.23 610 6/13/2023
4.1.22 589 5/30/2023
4.1.21 618 5/20/2023
4.1.20 315,813 4/19/2023
4.1.19 95,323 3/20/2023
4.1.18 704 3/20/2023
4.1.17 691 3/16/2023
4.1.16 679 3/16/2023
4.1.15 1,141 3/15/2023
4.1.14 1,806 3/9/2023
4.1.13 650 3/7/2023
4.1.12 729 2/10/2023
4.1.11 749 1/26/2023
4.1.10 756 1/22/2023
4.1.9 761 1/20/2023
4.1.8 766 1/18/2023
4.1.7 782 1/18/2023
4.1.6 764 1/17/2023
4.1.1 755 1/4/2023
4.1.0 771 12/30/2022
3.0.25 861 12/21/2022
3.0.24 867 11/18/2022
3.0.23 861 11/18/2022
3.0.22 883 11/15/2022
3.0.21 853 11/14/2022
3.0.20 878 11/13/2022
3.0.19 902 11/2/2022
3.0.18 886 11/2/2022
3.0.17 948 10/29/2022
3.0.16 940 10/29/2022
3.0.15 928 10/29/2022
2.0.6 967 9/20/2022
2.0.5 956 9/20/2022
2.0.4 871 9/20/2022
2.0.3 1,006 9/20/2022
2.0.1 1,072 9/13/2022
2.0.0 883 8/19/2022
1.1.23 1,127 7/30/2022
1.1.22 1,015 7/29/2022
1.1.21 971 7/29/2022
1.1.20 1,023 7/29/2022
1.1.19 1,047 7/27/2022
1.1.17 973 7/27/2022
1.1.15 995 7/25/2022
1.1.14 1,004 7/25/2022
1.1.13 958 7/22/2022
1.1.12 996 7/19/2022
1.1.11 1,011 7/19/2022
1.1.10 1,001 7/19/2022
1.1.9 1,016 7/19/2022
1.1.8 998 7/18/2022
1.1.7 992 7/18/2022
1.1.6 991 7/18/2022
1.0.4 1,021 7/17/2022
1.0.2 1,065 7/17/2022
1.0.1 902 7/12/2022
1.0.0 1,283 7/8/2022
0.10.7 1,058 7/8/2022
0.9.11 1,024 6/30/2022
0.9.10 973 6/29/2022
0.9.9 989 6/28/2022