RnewGrab Deal : Flat 20% off on live classes + 2 free self-paced courses! - SCHEDULE CALL Rnew

- Salesforce Blogs -

Queueable Apex Job

Introduction

A Queueable job that adds the job to the queue and each job runs when system resources become available.

Apex processes that run for a long time, such as extensive database operations or external Web service callouts, you can run them asynchronously by implementing the Queueable interface and adding a job to the Apex job queue Queueable Apex job runs in the background in its own thread and doesn’t delay the execution of your main Apex logic. Each queued job runs when system resources become available. Queueable interface methods help in increasing some governor limits are higher than for synchronous Apex, such as heap size limits.

Benefits of Salesforce Queueable Apex Jobs

Queueable apex jobs and future methods both are queued for execution, but Queueable jobs provide you with these additional benefits.

Read: All About Salesforce Certifications You Must Know
  • Getting an ID for your job:
  • When you submit your job by invoking the System. Enqueue Job method, the method returns the ID of the new job.
  • Using non-primitive types:
  • It contains some variables of non-primitive data types, such as sObjects or custom Apex types. Those objects can be accessed when the job executes.
  • Chaining jobs: You can chain one job to another job by starting a second job from a running job. Chaining jobs is useful if you need to do some processing that depends on another process to have run first.
  • You can Control Processes with Queueable Apex.

Enroll for an online Salesforce Training and become a Salesforce expert in just a matter of 6 weeks.

Things to Remember while Learning what Queueable Apex Job is-

  1. The execution of a queued job counts once against the shared limit for asynchronous Apex method executions.
  2. enqueue Job can add up to 50 jobs to the queue within a single transaction.
  3. When chaining jobs, you can add only one job from an executing job with System. Enqueue Job, which means that only one child's job can exist for each parent Queueable job.
  4. No limit is enforced on the depth of chained jobs, which means that you can chain one job to another job and repeat this process with each new child job to link it to a new child job. However, for Developer Edition and Trial orgs, the maximum stack depth for chained jobs is 5.

Sample Code:


public class QueueableExample implements Queueable {
public void execute(QueueableContext context) {
        Account a = new Account(Name='Daniel',Phone='(+12) 354-45345');
insert a;        
    }
}

Debug

ID jobID = System.enqueueJob(new QueueableExample());
system.debug(jobId);

Queueable Apex Job Queueable Apex Job  

Read: How To Pass All Salesforce Admin Certification Exams?

Now learn Salesforce at your own pace with our Salesforce Self-learning program.

Learn Salesforce in the Easiest Way

  • Learn from the videos
  • Learn anytime anywhere
  • Pocket-friendly mode of learning
  • Complimentary eBook available

Read: Future Career Growth of a Salesforce Developer and Programmer

Conclusion

Did you understand what Queueable Apex in Salesforce is about? Go to Janbask Training to learn more about Salesforce and its aspects. Also, sign up for a Salesforce course to have an in-depth understanding of it.



fbicons FaceBook twitterTwitter google+Google+ lingedinLinkedIn pinterest Pinterest emailEmail

     Logo

    JanBask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


  • fb-15
  • twitter-15
  • linkedin-15

Comments

Trending Courses

AWS Course

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53
AWS Course

Upcoming Class

-1 day 25 Sep 2023

DevOps Course

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing
DevOps Course

Upcoming Class

7 days 03 Oct 2023

Data Science Course

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning
Data Science Course

Upcoming Class

3 days 29 Sep 2023

Hadoop Course

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation
Hadoop Course

Upcoming Class

3 days 29 Sep 2023

Salesforce Course

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL
Salesforce Course

Upcoming Class

0 day 26 Sep 2023

QA Course

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing
QA Course

Upcoming Class

1 day 27 Sep 2023

Business Analyst  Course

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum
Business Analyst  Course

Upcoming Class

4 days 30 Sep 2023

MS SQL Server Course

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design
MS SQL Server Course

Upcoming Class

10 days 06 Oct 2023

Python Course

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation
Python Course

Upcoming Class

3 days 29 Sep 2023

Artificial Intelligence  Course

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks
Artificial Intelligence  Course

Upcoming Class

3 days 29 Sep 2023

Machine Learning Course

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning
Machine Learning Course

Upcoming Class

38 days 03 Nov 2023

Tableau Course

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop
Tableau Course

Upcoming Class

3 days 29 Sep 2023

Search Posts

Reset

Receive Latest Materials and Offers on Salesforce Course

Interviews