Soenneker.Cron.Builder 11.0.381

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Cron.Builder

A mutable fluent builder for five-field cron expressions, with optional leading seconds for six-field schedulers.

Installation

dotnet add package Soenneker.Cron.Builder

Common schedules

Construct a new builder for each expression; no dependency-injection registration is required.

using Soenneker.Cron.Builder;
using Soenneker.Enums.DayOfWeek;

string everyFiveMinutes = new CronBuilder()
    .WithMinuteInterval(5)
    .Build();
// */5 * * * *

string weekdayMorning = new CronBuilder()
    .Daily(hour: 9, minute: 30)
    .Weekdays()
    .Build();
// 30 9 * * MON-FRI

string mondayAtNoon = new CronBuilder()
    .Weekly(DayOfWeekType.Monday, hour: 12)
    .Build();
// 0 12 * * MON

string firstOfMonth = new CronBuilder()
    .Monthly(dayOfMonth: 1, hour: 2, minute: 15)
    .Build();
// 15 2 1 * *

ToString() returns the same value as Build().

Field order and defaults

Without WithSeconds, output uses the conventional order:

minute hour day-of-month month day-of-week

The untouched builder produces 0 * * * *, which means the top of every hour. Minutely() changes the minute field to *; Hourly() sets minute to 0 and hour to *.

Calling WithSeconds adds a leading seconds field:

string expression = new CronBuilder()
    .WithSeconds(30)
    .Minutely()
    .Build();
// 30 * * * * *

Six-field cron dialects are not universal. Confirm that the target scheduler interprets the first field as seconds before using this form.

Composition rules

Builder calls update individual fields; they do not reset unrelated fields. This allows combinations such as Daily(...).Weekdays(), but reusing a builder also retains earlier month or day restrictions. Create a new builder when starting a different schedule.

Numeric ranges are checked for seconds, minutes, hours, day of month, month, and interval methods. Build() rejects a fixed day of month combined with any day-of-week restriction because that combination has scheduler-dependent semantics.

OnDayOfWeek(string) uppercases and emits the supplied token unchanged. Use it only for syntax supported by the target scheduler; the builder does not validate raw expressions.

The builder only formats expressions. It does not evaluate schedules, apply a time zone, account for daylight-saving transitions, or register jobs with a scheduler. Instances are mutable and should not be shared across concurrent expression construction.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
11.0.381 73 11/18/2026
11.0.380 74 11/18/2026
11.0.378 93 11/15/2026
11.0.377 100 11/14/2026
11.0.376 90 11/11/2026
11.0.375 95 11/11/2026
11.0.374 86 11/11/2026
11.0.373 89 11/11/2026
11.0.372 95 11/11/2026
11.0.371 92 11/11/2026
11.0.370 88 11/11/2026
11.0.369 93 11/3/2026
11.0.368 95 11/3/2026
11.0.367 98 11/2/2026
11.0.366 107 10/27/2026
11.0.365 102 10/27/2026
11.0.364 95 10/26/2026
11.0.363 98 10/26/2026
11.0.362 87 10/26/2026
11.0.361 90 10/26/2026
Loading failed

Updated Soenneker.Extensions.String to 11.0.824