Soenneker.Cron.Builder 4.0.337

Prefix Reserved
dotnet add package Soenneker.Cron.Builder --version 4.0.337
                    
NuGet\Install-Package Soenneker.Cron.Builder -Version 4.0.337
                    
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="4.0.337" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Cron.Builder" Version="4.0.337" />
                    
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 4.0.337
                    
#r "nuget: Soenneker.Cron.Builder, 4.0.337"
                    
#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@4.0.337
                    
#: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=4.0.337
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Cron.Builder&version=4.0.337
                    
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 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
4.0.337 115 9/16/2026
4.0.336 94 9/16/2026
4.0.335 93 9/16/2026
4.0.334 92 9/15/2026
4.0.332 97 9/13/2026
4.0.331 91 9/13/2026
4.0.330 97 9/13/2026
4.0.329 97 9/12/2026
4.0.328 100 9/12/2026
4.0.327 105 9/12/2026
4.0.326 102 9/12/2026
4.0.325 103 9/9/2026
4.0.324 96 9/8/2026
4.0.323 95 9/8/2026
4.0.322 95 9/7/2026
4.0.321 101 9/7/2026
4.0.320 90 9/7/2026
4.0.319 96 9/7/2026
4.0.318 102 9/5/2026
4.0.317 97 9/4/2026
Loading failed

Updated NuGet packages