Overview of the background task configuration
The background task configuration contains all information for running background task services and handling background tasks.
Introduction
Background task configuration relies on the following two files:
- Admin.XMLBackgroundTaskConfiguration.xml
-
This is the primary configuration file for background tasks. It contains the configuration settings for running background task services and handling background tasks. The contents of the file is stored inside the Content Manager database and is accessible via Organize Space by going to .
- appsettings.json
-
This file enables you to specify values for environment variables. You can then use the variables can then be used inside the background task configuration.
The file is in the following location on the Content Manager server: \Infoshare\App\BackgroundTask\Bin\
Configuration for the background task services
- Should the service execute background tasks?
- How often should it poll for a new background task?
- Should the service recover failed background tasks?
If the service is configured to execute background tasks, the configuration specifies for which groups of event types the service is responsible. The configuration defines for every group how many background tasks are allowed to run in parallel.
Out-of-the-box, the services are installed with the 'Default' role and will pick up all possible background tasks. However, it is possible to configure for instance a service with the role 'Publish' picking up only the background tasks with event type EXPORTFORPUBLICATION
Configuration for the handlers
The XML configuration contains a list with handlers. Each handler is handling one eventType and can be executed synchronously or asynchronously. The handler is responsible for (1) starting the activator which will execute the background task and (2) handling any exception which occurs.
The configuration also specifies if the background task must be executed within the same process (of the service) or within a new process, and for how long the background task is allowed to execute. Each background task is executed within the security context of the user that submitted the background task. How the security context is created depends on the authorization type.
When the execution of the background fails, the configuration indicates for each error number if the background task must be retried and how many times the background task can be scheduled to re-execute.