-
Notifications
You must be signed in to change notification settings - Fork 458
QueueableChainingRecipes
pozil edited this page Nov 14, 2024
·
11 revisions
Demonstrates how to use the Queueable interface
to chain multiple queueable instances together. The methods in this class,
with the exception of the constructor, are run automatically by the system
as the job runs. To enqueue this job, use:
System.enqueueJob(new QueueableChainingRecipes());
More on the Queuable interface: https://sfdc.co/queueable-apex
Group Async Apex Recipes
See QueueableRecipes
Implements
Queueable
This recipe demonstrates how one queuable (this one) can enqueue a second Queueable class. If the second queueable class utilizes a constructor, information can be passed through to the next Queueable.
public static void execute(QueueableContext context)
Name | Type | Description |
---|---|---|
context | QueueableContext | Dependency Injected by the System |
void
System.enqueueJob(new QueueableChainingRecipes());