function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email batch jobs

I have a trigger that currently sends an email if a field is checked and the opportunity is at a certain stage. Unfortunately, I do not want to send the email at the time the stage is changed. I want to be able to send all the emails from each instance the trigger is triggered, at one time during a day.


Is there any way to do this?


You could leverage Scheduled/Batch Apex to be able to do this. Look at for more information on Batch apex and scheduled apex.