Rystem.BackgroundJob 5.0.14

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

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

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 net7.0 is compatible.  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 was computed.  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 56,952 11/16/2024
9.0.0-rc.1 76 10/18/2024
6.2.0 218,994 10/9/2024
6.1.1 107 10/9/2024
6.1.0 47,873 9/29/2024
6.0.24 145 9/11/2024
6.0.23 127 7/18/2024
6.0.21 125 6/18/2024
6.0.20 131 6/16/2024
6.0.19 125 6/14/2024
6.0.18 111 6/14/2024
6.0.17 117 6/14/2024
6.0.16 120 6/10/2024
6.0.15 114 6/9/2024
6.0.14 149 5/24/2024
6.0.13 130 5/23/2024
6.0.12 116 5/23/2024
6.0.11 125 5/20/2024
6.0.9 133 5/20/2024
6.0.7 118 5/18/2024
6.0.6 93 5/10/2024
6.0.5 101 5/10/2024
6.0.4 147 4/3/2024
6.0.3 297 3/25/2024
6.0.2 2,439 3/11/2024
6.0.1 182 3/8/2024
6.0.0 564 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 730 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 504 9/5/2023
5.0.14 544 9/5/2023
5.0.13 660 9/1/2023
5.0.12 500 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 520 8/24/2023
5.0.7 510 8/23/2023
5.0.6 538 8/21/2023
5.0.5 527 8/21/2023
5.0.4 545 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 629 7/31/2023
4.1.26 977 7/20/2023
4.1.25 628 7/16/2023
4.1.24 721 6/13/2023
4.1.23 612 6/13/2023
4.1.22 591 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 652 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 969 9/20/2022
2.0.5 958 9/20/2022
2.0.4 873 9/20/2022
2.0.3 1,008 9/20/2022
2.0.1 1,074 9/13/2022
2.0.0 885 8/19/2022
1.1.23 1,129 7/30/2022
1.1.22 1,017 7/29/2022
1.1.21 973 7/29/2022
1.1.20 1,025 7/29/2022
1.1.19 1,049 7/27/2022
1.1.17 975 7/27/2022
1.1.15 997 7/25/2022
1.1.14 1,006 7/25/2022
1.1.13 960 7/22/2022
1.1.12 998 7/19/2022
1.1.11 1,013 7/19/2022
1.1.10 1,003 7/19/2022
1.1.9 1,018 7/19/2022
1.1.8 1,000 7/18/2022
1.1.7 994 7/18/2022
1.1.6 993 7/18/2022
1.0.4 1,023 7/17/2022
1.0.2 1,067 7/17/2022
1.0.1 904 7/12/2022
1.0.0 1,285 7/8/2022
0.10.7 1,060 7/8/2022
0.9.11 1,026 6/30/2022
0.9.10 975 6/29/2022
0.9.9 991 6/28/2022