Disable Concurrency Execution of Recurring Jobs

Hi

In my code I have the following scenario.

RecurringJob.AddOrUpdate (“TestRecurring1”, () => FakeMethodRecurring (1), Cron.Minutely);
RecurringJob.AddOrUpdate (“TestRecurring2”, () => FakeMethodRecurring (2), Cron.Minutely);

But I do not want executions of the same Recurring Job to run concurrently.

The only thing I found in searches is the DisableConcurrentExecution attribute.

But does this apply the control of competition in the method, not the Recurring Job?

There is no way to configure this control of competition directly in Recurring Job?

Notice that in most cases, the methods remain the same, what changes are the values passed as method parameters.

If this is a limitation, the recurring job process becomes unusable.

Victor Perez

1 Like

You need a custom implementation if you want to use parameter as sychronization variable.

Hello,

Do you have a custom implementation for this scenario ?