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
MitChandolaMitChandola 

Code needed for apex batch class.

Hi, I need the code for apex batch that when is executed will send the email to the email addresses - ftpa@freemail.com and tpa@freemail.com. 

Scenario
We have weekly sales call on eveery Monday morning at 10:00 pm where we discuss the open opportubities in the pipeline. 
What I need - I need that if the any open opportunity owned by any rep has a close date or Implementaiton date 3 or 4 days close to the every monday sales call, then reps get the email to review those opportunity (they may like to make the changes to those dates). The email will essentually contain opp name, close dates, imp dates and and opp owner full name. The email will only show the opps that have this critiera. If there is no opps like that then no email. 

These are the API names of the fields: 
CloseDate
Name
OwnerId
Implementation_Start_Date__c

Thank you very much for your help and Happy Fridays! 

Mit
MitChandolaMitChandola
edit on question: I want the schedule job to run on every Thrusday so they get the email on Thrusday morning or afternoon to review the opps that have this criteria. Thank you.