In the Salesforce also exists the concept of job, of course, we can create a schedule job to trigger the corresponding class, to complete the time we need to process the function, such as: Timed synchronization data.
The specific processing steps are as follows:
1: The created class needs to inherit the Schedulable interface and implement the corresponding Execute method, which can complete our own code logic in the Execute method
Global class Syncstorecontroller implements schedulable {
//call the Web service to get the store info
global void Execute (schedulablecontext SC) {
system.debug ('---------001 hahaha. I am Sync store controller. ');
To do-complete your logic
}
}
2): To the Apex classes in Salesforce find the Schedule Apex button
3): Click on the Schedule Apex button in the above image to fill in the necessary information in the displayed interface
"Job name and Apex class, click on the search box to filter out the Class that has access and inherits the Schedulable interface."