Show HN: NaturalCron – Human-Readable Scheduling for .NET (With Fluent Builder) (github.com)

40 points by hugoj0s3 ↗ HN
Hi HN!

I built NaturalCron because I was tired of writing and debugging CRON syntax like:

/5 * * 5

Now you can write something human-readable in .NET:

var expression = new NaturalCronExpression("every 5 minutes on friday");

Or use a Fluent Builder for strong typing and IDE support:

var expression = NaturalCronExpressionBuilder .Every().Minutes(5) .On(DayOfWeek.Friday) .Build();

Great for: - Code-based scheduling in .NET apps - Overriding schedules from configs or databases - Displaying easy-to-read rules in UIs

NuGet: https://www.nuget.org/packages/NaturalCron GitHub: https://github.com/hugoj0s3/NaturalCron

Would love your feedback on syntax, builder design, and what features you'd like to see next!

8 comments

[ 4.2 ms ] story [ 31.6 ms ] thread
How flexible is the syntax? Can I write whatever and have a chance it parses correctly?
> Because memorizing 0 18 * * 1-5 is harder than understanding every day between monday and friday at 6:00pm

Really? Does “Every day between Monday and Friday” include Monday and Friday? One could think the days between Monday and Friday are Tuesday, Wednesday and Thursday.

Why people don’t just learn cron syntax is beyond me.

I think this is good for people who only have occasional need for scheduling. I’ve used cron enough that I appreciate its compactness and would find this cumbersome and difficult.
Cron is definitely not the biggest problem in my life. I've never had a problem with its format. I think this is a solution to a problem I don't have - and I tend to find that "English like" formats don't do me any favours.
That's nice but I don't think Cron syntax is a big of a problem, most of the time.
How does it handle “bi-weekly”?

At the end of the day, anyone using cron-type things should just learn cron syntax, it’s really not that difficult and there are a number of websites that you can use to assist or spot-check your work.

I’m always incredibly resistant to “human readable” for things like this because there is just too much ambiguity.

(comment deleted)
Cron is great and widely used—I’m not trying to replace it. This is just another option for situations where you need something more readable for non-technical users or when you want to store schedules in a database and display them in plain language. There are valid use cases for both approaches.

The goal is provide a format that’s user-friendly while still being precise enough for developers and systems to rely on. It’s especially useful for things like configurable schedules in apps, admin dashboards, or any context where end users and developers need to share the same language.

I appreciated the feedback and comments.