Soenneker.Utils.CronExpressions 4.0.299

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

Static helpers for producing common five-field cron expressions.

Installation

dotnet add package Soenneker.Utils.CronExpressions

Usage

string everyFiveMinutes = CronExpressionUtil.EveryXMinutes(5); // */5 * * * *
string everySixHours = CronExpressionUtil.EveryXHours(6, minute: 15); // 15 */6 * * *
string daily = CronExpressionUtil.DailyAt(hour: 2, minute: 30); // 30 2 * * *
string weekly = CronExpressionUtil.WeeklyAt(DayOfWeekType.Monday, hour: 9); // 0 9 * * MON
string monthly = CronExpressionUtil.MonthlyAt(dayOfMonth: 1, hour: 8); // 0 8 1 * *
string weekdays = CronExpressionUtil.WeekdaysAt(hour: 7, minute: 45); // 45 7 * * MON-FRI
string weekends = CronExpressionUtil.WeekendsAt(hour: 10); // 0 10 * * SAT,SUN

The output order is minute hour day-of-month month day-of-week. These expressions do not include a seconds or year field. The scheduler consuming the expression determines its timezone and exact cron dialect, so verify that it accepts standard five-field syntax and named weekdays.

The pattern helpers validate minute, hour, interval, and day-of-month ranges. A monthly expression using day 29, 30, or 31 simply has no occurrence in months that lack that date.

Custom fields

Format() combines numeric minute/hour values with caller-supplied day, month, and weekday fields:

string firstQuarter = CronExpressionUtil.Format(
    minute: 0,
    hour: 6,
    dom: "1",
    month: "1,4,7,10",
    dow: "*");

Format() performs formatting only; it does not validate any field. Use the pattern-specific methods when their validation and semantics fit the schedule.

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.299 46 9/5/2026
4.0.298 41 9/4/2026
4.0.297 42 9/4/2026
4.0.296 38 9/4/2026
4.0.295 87 8/31/2026
4.0.294 75 8/31/2026
4.0.293 93 8/31/2026
4.0.292 87 8/30/2026
4.0.291 92 8/30/2026
4.0.290 89 8/30/2026
4.0.289 93 8/30/2026
4.0.288 99 8/30/2026
4.0.287 84 8/30/2026
4.0.286 79 8/30/2026
4.0.285 95 8/29/2026
4.0.284 84 8/29/2026
4.0.283 90 8/29/2026
4.0.282 99 8/26/2026
4.0.281 92 8/26/2026
4.0.280 86 8/25/2026
Loading failed

Update dependency Soenneker.Extensions.String to 4.0.739 (#836)