⦁ Definition:
i).Runs in the background at a specified time and repeated frequency (daily,
weekly, or once).
ii).Performs actions on a batch of records without manual intervention.
⦁ Benefits:
i).Saves time and minimizes the risk of manual data update errors.
ii).Can be scheduled to run during off-hours to reduce potential record conflicts
with active users.
⦁ Management:
- Monitored and managed in Setup from the Scheduled Jobs page.
⦁ Independence:
- Runs independently of record changes.
Creation:
1. Start building a new flow from the New Flow menu by selecting Schedule-Triggered
2. Choose the time you want to run a flow
3. Get the record you want to update based on your criteria.
5. Assign the value you want to update
6. Store the record in a collection
7. Then Update the record using a collection of record
Difference between Schedule-Triggered Flow and Batch Apex
Capabilities and Record Handling:
Batch Apex:
i),Capable of processing a large number of records (up to 50 million).
ii),Suitable for complex operations with more flexibility.
Schedule-Triggered Flow:
i).Can process up to 50,000 records before hitting governor limits.
ii).Designed for simpler, low-code operations.
Interview Limits:
Batch Apex:
i).Handles tasks at regular intervals with high flexibility.
Schedule-Triggered Flow
i).Maximum of 250,000 interviews per 24 hours, or the number of user
licenses multiplied by 200 (whichever is greater).
ii).One interview is created per record retrieved by the flow’s query.
Batch Size:
Batch Apex:
i).Maximum batch size of 2,000.
Schedule-Triggered Flow:
i).Maximum batch size of 200.
Scheduling Flexibility:
Batch Apex:
i).Supports hourly, daily, weekly, or monthly intervals.
Schedule-Triggered Flow:
i).Less flexible in terms of scheduling intervals compared to Batch Apex.
Considerations:
i).Use Batch Apex for large volumes of data or complex scheduling needs.
ii).Use Schedule-Triggered Flow for simpler processes with fewer records and less
frequent scheduling requirements.