Hangfire: how to validate cron expression befor run a job

Created on 8 Oct 2017  路  2Comments  路  Source: HangfireIO/Hangfire

Hi .
I have some jobs but I don't set Interval in hard code and Client Can Set it in Application . now I have a Problem about Cron expression . I wanted to use Quartz Library to validate it but Hangfire accpet 5 char for Cron and Quartz has 7 part in cron expression .
How can I validate Cron Expression befor assign to Recuuing Job .
Thank you very much .

question

Most helpful comment

Why don't you just use NCrontab library Hangfire currently uses for cron expressions?

All 2 comments

Why don't you just use NCrontab library Hangfire currently uses for cron expressions?

I didn't know Hangfire Uses NCrontab . I do that by Ncrontab . it has Parse and TryParse method to Check Cron Expression .
thank you

Was this page helpful?
0 / 5 - 0 ratings