How to AddOrUpdate RecurringJob for every 2 hours

Tags: #<Tag:0x00007f499ac16e80>



We are using abp and hangfire.

Upgraded to HFA core 1.7.3 and abp.hangfire to 4.6.
Just wondering how do we set 2 hourly job.

Best Regards,


When adding the recurring job, you have to use this cron expression so that it runs every 2 hours :
* */2 * * *

reference :


Hi Steven,

Thanks for the expression. We are using Corn.Hourly(…), Corn.Daily()
What does that equvalent using Corn.?

Best Regards,


If you could use Cron.HourInterval(2) but it’s deprecated and will be removed in 2.0.0, so i would suggest using the Cron expression * */2 * * *.

From what i can understand, The Cron class just returns Cron expressions, so it practically makes no difference.