Flowly.Jobs
1.0.1
dotnet add package Flowly.Jobs --version 1.0.1
NuGet\Install-Package Flowly.Jobs -Version 1.0.1
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="Flowly.Jobs" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Flowly.Jobs" Version="1.0.1" />
<PackageReference Include="Flowly.Jobs" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Flowly.Jobs --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Flowly.Jobs, 1.0.1"
#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.
#:package Flowly.Jobs@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Flowly.Jobs&version=1.0.1
#tool nuget:?package=Flowly.Jobs&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Flowly.Jobs
Job state tracking and CRON scheduling for Flowly. Track long-running work through Created → Started → Completed / Failed with persistent state in SQL Server or PostgreSQL.
Quick Start
Also install a database backend: Flowly.Jobs.SqlServer or Flowly.Jobs.Postgres.
Define a job message
public record ProcessReportJob(Guid ReportId, DateOnly Period) : IJobMessage
{
public string Description => $"Process report {ReportId}";
public string JobTypeName => nameof(ProcessReportJob);
}
Write a job handler
[RetryPolicy(maxRetries: 2, delaySeconds: 120)]
public class ProcessReportJobHandler : JobMessageHandlerBase<ProcessReportJob>
{
public override async Task Handle(IJobMessageContext<ProcessReportJob> ctx)
{
await ctx.SaveState(new { Step = "Fetching data" });
var data = await FetchData(ctx.Message.ReportId, ctx.CancellationToken);
await ctx.SaveState(new { Step = "Generating PDF", Rows = data.Count });
await GeneratePdf(data, ctx.CancellationToken);
}
}
Register and submit
builder.AddFlowly(configure => configure
.UseAzureServiceBus("AzureServiceBus")
.AddSqlServerJobStateTracking(connectionString)
.AddJobHandler<ProcessReportJob, ProcessReportJobHandler>()
.AddJobSubmitter<ProcessReportJob>());
public class ReportController(IJobMessageSender jobSender)
{
public Task<Guid> StartReport(DateOnly period, CancellationToken ct)
=> jobSender.QueueJob(new ProcessReportJob(Guid.NewGuid(), period), ct);
}
Recurring Jobs
[RecurringJob("Nightly Report", "0 2 * * *")]
public class NightlyReportJob : RecurringJobHandlerBase
{
public override async Task Handle(CancellationToken ct)
=> await GenerateReport(ct);
}
builder.AddRecurringJob<NightlyReportJob>();
The scheduler polls every 5 seconds and guarantees single execution across replicas using session-based queues.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Flowly (>= 1.0.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.7)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Flowly.Jobs:
| Package | Downloads |
|---|---|
|
Flowly.Jobs.Postgres
PostgreSQL backend for Flowly job state tracking. |
|
|
Flowly.Jobs.SqlServer
SQL Server backend for Flowly job state tracking. |
GitHub repositories
This package is not used by any popular GitHub repositories.