Async Job Group Overview

Async Job Group provides a way to manage and organize background operations within the org. The Async Job Group offers several key advantages for robust and auditable asynchronous processing:

  • Consolidate related jobs together for clearer organization and management.
  • Maintain a comprehensive history of all jobs executed within a group, making it easy to track progress and troubleshoot issues.
  • Efficiently signal the cancellation of all jobs belonging to a specific group, providing a clean way to stop ongoing processes.
  • Establish sophisticated dependency chains, ensuring jobs execute in a predefined order.

Every job record is automatically assigned to a job group. This can happen explicitly by the administrator or implicitly by the framework. When a job is implicitly assigned, it will either:

  • Inherit the job's group if another job initiated the current job.
  • A new default group will be created and assigned if no existing group can be adopted.
Warning:

While adopting job groups can be beneficial, you need to be aware of their impact on dependency chains.

For example, if Job 2 depends on Group 2, and new jobs are added to Group 1 without specifying a job group, these will also join Group 1. This prevents Group 1 from completing and delays Group 2 until all new jobs finish.

This behavior ensures related work is finished. However, for independent or perpetual jobs, set its group explicitly to prevent it from becoming dependent and blocking other processes.

User Mode and Delegated System Mode

Depending on the requirement, you can run the async job groups in the User Mode and the Delegated System Mode.