I try to run RecurringJob Hagnfire. This method is async method and Hagnfire doesn’t accept await.
the solution is create recurring task hold background task bet is not work it’s throw exception

RecurringJob.AddOrUpdate(Guid.NewGuid().ToString(), () => _backgroungJobClient.Enqueue(() =>_jobServices.SyncRecords()), Cron.Daily);

System.NotSupportedException: ‘Anonymous functions, delegates and lambda expressions aren’t supported in job method parameters: it’s very hard to serialize them and all their scope in general

I want run RecurringJob and the call menthod is async

New contributor

Mahmoud Yousry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Khám phá các thẻ bài đăng