Cert++
Close

Schedule-triggered Flow versus Batch Apex

Key Takeaway

A schedule-triggered flow is the low-code choice for work that runs at a set time across a batch of records. Batch Apex is the pro-code choice for complex, long-running jobs on large amounts of data, if your team has Apex developers who can maintain it.

A schedule-triggered flow is a low-code automation that runs at a set time and can work through a batch of records that meet filter conditions. Batch Apex is pro-code: a developer writes Apex that splits a large record set into chunks to run complex, long-running jobs on thousands of records. Both tools run in the background, but they differ in the skills required, their scheduling options, and the governor limits they enforce.

How the two tools differ
Schedule-triggered flowBatch Apex
Skills requiredLow-codePro-code
Scheduling optionsA start date and time, plus a frequency of one time, daily, or weeklyA specific time, set with the Apex scheduler in code or from the Schedule Apex page in the user interface
Governor limitsRuns in a synchronous context with synchronous limitsEnforces asynchronous limits, and some are higher (for example, SOQL query and heap size limits)

The higher asynchronous limits are why Batch Apex is best at processing large amounts of data.

Scheduled Apex uses a cron expression to set its time and frequency.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Given a scenario, identify the boundaries of declarative customization and the use cases for programmatic customization

0/10

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.