@ -236,6 +236,79 @@ Background Jobs module implements `IBackgroundJobStore` using various data acces
> Background Jobs module is already installed to the startup templates by default and it works based on your ORM/data access choice.
### Multiple Applications Use Same Storage
If you have multiple applications using one storage as background jobs and workers(`Default, Hangfire, RabbitMQ, and Quartz`), You should set the provider options to use the application name to isolate.
#### Default Background Job/Workers
Set `ApplicationName` of `AbpBackgroundJobWorkerOptions` to your application name.
````csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
The default background job manager is compatible with [clustered environments](../../../deployment/clustered-environment.md) (where multiple instances of your application run concurrently). It uses a [distributed lock](../distributed-locking.md) to ensure that the jobs are executed only in a single application instance at a time.
@ -132,6 +132,80 @@ If that's a problem for your workers, you have the following options:
* Stop the background workers (set `AbpBackgroundWorkerOptions.IsEnabled` to `false`) in all application instances except one of them, so only the single instance runs the workers.
* Stop the background workers (set `AbpBackgroundWorkerOptions.IsEnabled` to `false`) in all application instances and create a dedicated application (maybe a console application running in its own container or a Windows Service running in the background) to execute all the background tasks. This can be a good option if your background workers consume high system resources (CPU, RAM or Disk), so you can deploy that background application to a dedicated server and your background tasks don't affect your application's performance.
### Multiple Applications Use Same Storage
If you have multiple applications using one storage as background jobs and workers(`Default, Hangfire, RabbitMQ, and Quartz`), You should set the provider options to use the application name to isolate.
#### Default Background Job/Workers
Set `ApplicationName` of `AbpBackgroundJobWorkerOptions` to your application name.
````csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
Background worker system is extensible and you can change the default background worker manager with your own implementation or on of the pre-built integrations.