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
AngelikaAngelika 

How to make an APEX Scheduler Class (new to APEX/basic knowledge of coding)

The salesdepartment in my organization needs to review contracts 14 days before they are due recurring every year. We need to find a way that reminds them to review the information 14 days before the review date EVERY YEAR (recurring).
 
Upon the advice of this message board, I have decided to use a scheduled apex class. According to message board post, the class would run every day, find the records that meet the criteria, build the emails off of those records and email the correct recipients in the sales team.
 
So, the scheduled class would run everyday and determine if the review date is 14 days away. If the criteria is met (the review date is 14 days away) the scheduled class will send out an email to the sales team. If not, no emails are sent because the criteria is not met.
 
I have no experience programming in APEX, yet alone a scheduler class. Any advice for tutorials to look at or sample code?
 
Thank you so much!
Navatar_DbSupNavatar_DbSup

Hi,

 

Follow the below link:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

AngelikaAngelika

Thanks Ankit,

 

I already had that information....I was looking for tutorials on how to make an apex scheduler...I will keep this post open, but thanks for your answer!

Jerun JoseJerun Jose
Not exactly sure what you are expecting as a tutorial. The doc has a sample schedulable apex class defined. It should also have the stuff on how to schedule it, to kick off the processing.