Shaunebu.Bussiness.ReportGenerator.Scheduler 1.0.0

dotnet add package Shaunebu.Bussiness.ReportGenerator.Scheduler --version 1.0.0
                    
NuGet\Install-Package Shaunebu.Bussiness.ReportGenerator.Scheduler -Version 1.0.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="Shaunebu.Bussiness.ReportGenerator.Scheduler" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shaunebu.Bussiness.ReportGenerator.Scheduler" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Shaunebu.Bussiness.ReportGenerator.Scheduler" />
                    
Project file
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 Shaunebu.Bussiness.ReportGenerator.Scheduler --version 1.0.0
                    
#r "nuget: Shaunebu.Bussiness.ReportGenerator.Scheduler, 1.0.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.
#:package Shaunebu.Bussiness.ReportGenerator.Scheduler@1.0.0
                    
#: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=Shaunebu.Bussiness.ReportGenerator.Scheduler&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Shaunebu.Bussiness.ReportGenerator.Scheduler&version=1.0.0
                    
Install as a Cake Tool

Shaunebu.Bussiness.ReportGenerator.Scheduler

NuGet Version

License Build

Platform CrossPlatform Compatibility

Production Ready Performance Architecture Developer Friendly

Scheduler Automation Integrations

BuyMeACoffee

Automate report generation with Cron expressions & background scheduling

This package enables automatic report execution using:

  • โฐ Cron expressions (0 9 * * *)

  • ๐Ÿ” Interval recurrence

  • ๐Ÿ“Œ Manual triggers

  • ๐Ÿง  Persistent scheduler registry

  • ๐Ÿงฉ Full integration with Shaunebu.Bussiness.ReportGenerator

It works seamlessly inside:

  • ASP.NET Core

  • Worker Services

  • Console apps

  • Background services


๐Ÿš€ Features

โฐ Flexible Scheduling

  • Cron-based (0 0 * * MON-FRI)

  • Fixed intervals (Every 15 minutes)

  • Daily/weekly/monthly jobs

  • Tenant-aware execution


๐Ÿงฉ Report Pipeline Integration

You can schedule:

  • PDF reports

  • HTML, Word, Excel, Markdown

  • Any DataSource

  • Any Exporter (email, cloud, REST)


๐Ÿ“ Register Jobs at Startup

services.AddShaunebuScheduler();

๐Ÿ”ง Configuration (Optional)

Add in appsettings.json:

{
  "ReportScheduler": {
    "Jobs": [
      {
        "ReportId": "DailyInvoice",
        "Cron": "0 8 * * *",
        "Tenant": "contoso"
      }
    ]
  }
}

๐Ÿ“ฅ Installation

dotnet add package Shaunebu.Bussiness.ReportGenerator.Scheduler

๐Ÿงช Example โ€” Schedule a Daily Report

var scheduler = provider.GetRequiredService<IReportSchedulerService>();

await scheduler.ScheduleReportAsync(
    reportId: "DailyInvoiceReport",
    cronExpression: "0 9 * * *"
);

๐Ÿ“Œ Trigger Manually

await scheduler.TriggerNowAsync("DailyInvoiceReport");

๐Ÿ—‚๏ธ List All Scheduled Jobs

foreach (var job in scheduler.GetScheduledReports())
{
    Console.WriteLine($"{job.ReportId} โ†’ {job.CronExpression} | Next: {job.NextRun}");
}

๐Ÿ” Example: Interval Schedule (Every 10 minutes)

await scheduler.ScheduleIntervalAsync("QuickSales", TimeSpan.FromMinutes(10));

๐Ÿ” Secure & Tenant-Aware

Jobs can target a tenant:

await scheduler.ScheduleReportAsync(
    "TenantAReport",
    "0 */2 * * *",
    tenantId: "tenant-a"
);

๐Ÿง  How It Works

The scheduler:

  1. Loads registered jobs

  2. Evaluates cron expressions

  3. Fires the ReportBuilder pipeline

  4. Logs audit & telemetry automatically

  5. Supports concurrent executions

  6. Handles failures & retries


๐Ÿ’ก Typical Use Cases

  • Daily invoice reports

  • HR weekly summaries

  • Automated Excel data exports

  • REST/webhook reports

  • Monthly financial PDFs

  • Daily cloud backups of data snapshots


๐Ÿงฉ Integration with ReportGenerator

var result = await factory.Create()
    .WithName("DailySales")
    .FromSql("SELECT * FROM Sales WHERE Date = Today")
    .ToPdf()
    .ExportAsync();

Then schedule it:

await scheduler.ScheduleReportAsync("DailySales", "0 7 * * *");
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.  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.

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.0.0 320 11/13/2025