Hacker News new | ask | show | jobs
by simonw 634 days ago
With the right harness around it you could trust it. Set it up so that it takes your input, generates the cron expression, then uses a deterministic cron library to spit out a summary of what that expression does plus a list of next upcoming instances.

That should give you all the information you need to determine if it got the right expression.

2 comments

You think it would work to just pipe that description and next occurrences and ask an llm if it matches the intended prompt?
No, that still leaves a small probability of something weird happening - and since it's a small probability you might not ever spot it in your own testing.

In this case I think it's better to run known, deterministic code that can turn a crontab into a clear explanation.

Wow. The things people will do to avoid learning cron syntax