This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class contactUpdateFromScheduleClass implements Schedulable { | |
/* | |
This is a ScheduleClass to run every hours after 6 mins to update contact records | |
*/ | |
// Execute below code in developer console | |
// It schedules this class to run every hour after 6 minutes (like 8:06, 9:06, 10:06, etc..) | |
// This is one minute after the exchange rates are fetched from Open Exchange Rates. | |
/* | |
contactUpdateFromScheduleClass contactUpdate = new contactUpdateFromScheduleClass(); | |
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class contactUpdateFromScheduleClassTest { | |
@isTest static void contactUpdateTest_Schedule() { | |
Contact cont = new Contact(FirstName ='First Name', LastName ='Last Name', Email='sakthi@theblogreaders.com'); | |
insert cont; | |
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year | |
String CRON_EXP = '0 6 * * * ?'; |
OlderNewer