HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.44k stars 1.71k forks source link

How to get schedule settings from cron expression? #2347

Open SoftCircuits opened 10 months ago

SoftCircuits commented 10 months ago

So, we're using Hangfire and it's working great.

But I need to create a user interface for scheduling tasks. I have no problem creating the HTML elements for this interface. But how to populate them from a cron expression?

I found Cronos, which will parse a cron expression. But it doesn't expose the schedule indicated by the expression. It will only tell you things like when is the next occurrence for that schedule.

Does anyone know of any way to get the underlying data structures associated with a cron expression so that I can populate HTML elements so the user can edit the schedule?