Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 769 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 769 Bytes

Build status NuGet

norC

Get a CRON expression from a human-readable string.

Installation

dotnet add package norC --prerelease

Usage

CronExpression cron = CronExpression.FromHumanString("Every day at 3 PM");
Console.WriteLine(cron); // output: 0 15 * * *

// or

CronExpression cron = "Every month".AsCron();
Console.WriteLine(cron); // output: 0 0 1 * *

Options

CronExpression cron = "Every second".AsCron(new CronOptions { IncludeSeconds = true });
Console.WriteLine(cron); // output: * * * * * *