I built NaturalCron, a C# library that makes scheduling recurring events as easy to read as:
every 25 minutes on friday between 1:00pm and 3:00pm
Instead of wrestling with cryptic CRON syntax, you can define schedules in a natural-language–style format. It’s especially handy for storing schedules in a database or letting end-users view/edit them
using System;
using NaturalCron;
// Define an advanced expression
string expression = "every 30 minutes in [jan, jun] between 09:00 and 18:00";
// Parse and calculate next occurrence (local time)
NaturalCronExpr schedule = NaturalCronExpr.Parse(expression);
DateTime next = schedule.GetNextOccurrence(DateTime.Now);
Console.WriteLine($"Next occurrence: {next}");
Why?
CRON is powerful but hard to read. RecurlyEx aims to bring flexibility and readability for developers and end-users alike.
Top comments (0)