Skip to main content

Background processing

Background processing is useful when a process-intensive task or automation is required. Executing tasks in the background allows users to continue the case or other work and improves system scalability and performance.

For example, a company with a single dedicated server needs users to regularly process and upload batch files to an external content management system. Users need to perform uploads while processing new cases without experiencing delays in performance. In Pega Platform, you can configure a rule to automate file upload activity in the background. By moving tasks to dedicated nodes or off-peak hours, users can continue to process cases without any impact caused by the uploading operations.

Clusters and nodes

A Pega Platform installation often spans a set of servers called a cluster. Within this cluster, each server, or node, can be designated a node type for specific processing tasks.

Nodes and clusters gif

The system can then allocate background tasks to one node while processing user interactions on a different node. As a result, the system can optimize performance on each node for the types of interactions that the node supports.

Background process requirements

In the following image, click the + icons to learn more about the requirements to configure a background process.

Note: It is a best practice for all existing applications that use background processing to have the Include in background processing option selected. For Pega Platform upgrades, your existing context is migrated from the current ASYNCPROCESSOR requestor type to the System Runtime Context. New applications created with the new application wizard have the Include in background processing option enabled by default.

Types of background processing

Pega Platform has two options for performing system tasks on objects in the background: Queue Processor rules and Job Scheduler rules.

The Queue Processor queues tasks for background processing, identifying which tasks to queue.

  • Tasks can be queued using either a Run in Background automation or the Queue-For-Processing method in an activity.
  • Tasks can be queued immediately or the queue can be delayed
  • Run a specified activity on the queued item

For example, a queue processor is configured to batch process file uploads to a database. 

queue-processor-example

The Job Scheduler schedules a recurring task that runs at a specified interval and identifies the tasks to process at that time.

For example, a company that wants to prompt a customer to renew their insurance policy requires a process that automatically sends an email 30 days before an insurance policy is set to expire. You can handle the requirement with a job scheduler configured to run daily to identify all policies that expire in 30 days.

job-scheduler-example
Note: Use Queue Processors and Job Schedulers to replace standard and advanced agent types found in older versions of Pega Platform. For more information about background processing best practices, see the Pega Community article Configuring resources - use job schedulers and queue processors instead of agents.

Check your knowledge with the following interaction.

Queue Processor

In the following image, click the + icon to learn more about the options and configuration details for queue processors. 

On the Queue processor rule form, you may also need to configure the Processing retries section.

  • Max Attempts – The number of attempts to retry a queued process.
  • Initial Delay – The number of minutes before the second attempt of a queued process.
  • Delay Factor – The multiplier for the delay between attempts. For example, if the initial delay is 1 minute and the delay factor is 2, the retries would be 1, 2, 4, 8, and so on, minutes apart.

Job Scheduler

Job Schedulers are most suitable for tasks that recur on a regular basis. For example, overnight batch jobs are a typical use case for job scheduler rules.

In the following image, click the + icons to learn more about the configuration options for job scheduler rules.

Check your knowledge with the following interaction.

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice