0

I need to implement some recurring jobs via Hangfire, and I can't find anything about usage of async method inside RecurringJob.AddOrUpdate method.

RetrieveFriscoProductsJob is the class which has asynchronous method named ProcessAsync(). Should this work or not? Can we add async recurring job in Hangfire? If yes how we should do it properly?

RecurringJob.AddOrUpdate<RetrieveFriscoProductsJob>(x => x.ProcessAsync(), Cron.Daily, null);
tzm
  • 588
  • 1
  • 12
  • 27

1 Answers1

0

Nowadays, Async methods are applicable to Hangfire RecurringJob.AddOrUpdate<>();, however it will be sync under-the-hood anyway. More details on it

hastrb
  • 410
  • 4
  • 12