How can I configure hangfire to excute only a instance?

Hi,

I’m having problem with hangfire when I use recurringjob. My app has many jobs and sometimes a instance starts a job, same time that another instance still executing. I use InstancePerLifetimeScope, but when I use InstancePerBackgroundJob, hangfire throws a expection “Autofac.Core.DependencyResolutionException”. How can I solve this problem?

Regards

I’m using these attributes and from what I can tell I only have one instance running at a time now.

[DisableConcurrentExecution(10)]
[AutomaticRetry(Attempts = 0, LogEvents = false, OnAttemptsExceeded = AttemptsExceededAction.Delete)]

Hi,

thank you for your advice. It works for me.