Skip to content

QueueableChainingRecipes

pozil edited this page Oct 19, 2020 · 11 revisions

layout: default

QueueableChainingRecipes class

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

Related

QueueableRecipes


Methods

execute(QueueableContext context)void

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.

Parameters

Param Description
context Dependency Injected by the System

Example

System.enqueueJob(new QueueableChainingRecipes());

Clone this wiki locally