Create Hangfire recurring job daily on specific time

Smith
Smith
None
2568 Points
74 Posts

I am trying to run hangfire recurring job daily on 11.00 AM. Here is what I want to do-

RecurringJob.AddOrUpdate(() => MyMethod(), "* 11 * * *");

But it's always confusing cron expression. Is there any other way?

Views: 7700
Total Answered: 1
Total Marked As Answer: 0
Posted On: 10-May-2019 01:39

Share:   fb twitter linkedin
Use cron object cron.Daily(11)
 - beginer  10-May-2019 20:05
Answers
Rashmi
Rashmi
Member
820 Points
17 Posts
         

Use cron object as

RecurringJob.AddOrUpdate(() => MyMethod(), Cron.Daily(11,0));

It provides different static method that returns cron expressions

 

Posted On: 10-May-2019 20:10
 Log In to Chat