c# - Programmatically creating Hangfire cron expression based on user input -
i have c# .net web application ui looks similar http://www.cronmaker.com/. user can select frequency of job many options. need able create cron expression represent user's desired frequency, , must compatible hangfire. ideas either:
find existing library it. haven't been able to. heard quartz (though overkill), seemed create cron expressions cases not others.
make own tool, using cronmaker.com figure out format. however, cronmaker creates cron expressions in format hangfire considers invalid. "every hour," cronmaker says "0 0 0/1 1/1 * ? *" hangfire said invalid. found "0 */1 * * *" works.
i need able dynamically generate cron expression. surely there's library out there can cronlibrary.getcronexpression(frequency.everyndays, 3, "12:00") options cover every conceivable situation. know of such library ?
i didn't find library, site http://crontab.guru/ tremendously helpful creating cron expressions valid hangfire. using site reference, able write code map ui selections cron expression , vice versa.
Comments
Post a Comment