Naravel.Scheduling 0.2.0

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

Naravel.Scheduling

NuGet Downloads .NET 10 License: MIT

Naravel task scheduling: a fluent, named schedule run by a hosted service, with overlap and one-server guards over Naravel.Cache locks.

Fact Detail
Install dotnet add package Naravel.Scheduling
Targets .NET 10
Needs Naravel.Cache, which NuGet installs with it

What you get

  • A fluent, named schedule. schedule.Call("name", handler) followed by EveryFiveMinutes(), DailyAt(8, 0), WeeklyOn(...) or Cron("*/20 9-17 * * 1-5").
  • A hosted service runs it. It wakes once a minute and starts what is due, and each run gets its own DI scope.
  • Guards over cache locks. WithoutOverlapping() and OnOneServer() run on Naravel.Cache locks.
  • Time zones. Times are UTC unless a task calls InTimeZone(zone).

Quick start

builder.Services.AddNaravelCache(builder.Configuration);   // from Naravel.Cache: the lock driver for WithoutOverlapping and OnOneServer

builder.Services.AddNaravelScheduling(schedule =>
{
    // Task names are yours: ASCII letters, digits and . _ : - , at most 100 characters.
    schedule.Call("prune-sessions", (sp, ct) => sp.GetRequiredService<SessionPruner>().RunAsync(ct))   // SessionPruner is your own service
        .EveryFiveMinutes()
        .WithoutOverlapping();

    schedule.Call("daily-digest", (sp, ct) => sp.GetRequiredService<Digest>().SendAsync(ct))   // so is Digest
        .DailyAt(8, 0)
        .OnOneServer();
});

If the host was stopped, the missed minutes are skipped, not replayed; there is no catch-up in this version.

WithoutOverlapping() skips a run while the previous one still holds its lock; the lock expires after one hour (SchedulingOptions.OverlapTtl), so a crash cannot block the task for good. OnOneServer() needs a lock driver that all instances share (Redis or Memcached): with the Memory cache driver every instance would run the task, so the host refuses to start.

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

Product 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.

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
0.2.0 94 11/13/2026
0.1.1 102 11/2/2026
0.1.0 107 11/1/2026