I am encoding an MVC 5 web application and using HangFire for repetitive tasks.
If I have a monthly recurring task, how can I get the next runtime value?
Here is my code for the repetitive task:
RecurringJob.AddOrUpdate("AccountMonthlyActionExtendPaymentSubscription", () => accountService.AccountMonthlyActionExtendPaymentSubscription(), Cron.Monthly);
I can get the job data as follows:
using (var connection = JobStorage.Current.GetConnection()) { var recurringJob = connection.GetJobData("AccountMonthlyActionExtendPaymentSubscription"); }
However, I am not sure what to do next.
Is it possible to get the next execution time of a repeating task?
Thanks in advance.
source share