+ Start a Discussion
subrat pandasubrat panda 

Scheduled apex

Hi I want to know about the schedule apex ? How to write the schedule apex classes?
Best Answer chosen by subrat panda
Elad Kaplan 11Elad Kaplan 11
In order to write a schedule apex class, you will have to impement an Interface calls Schedulable, that enables you to run the class on a scheduler.

The class has 1 method   (Execute)  which runs upon execution of the class.

This is an example :

global class Your_Class_Name implements Schedulable{

global void execute(SchedulableContext SC) {
             
          //  The code for execution
   }

}

All Answers

Grazitti TeamGrazitti Team
Hi Subrat,

Refer the link below:

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

Thanks!
Elad Kaplan 11Elad Kaplan 11
In order to write a schedule apex class, you will have to impement an Interface calls Schedulable, that enables you to run the class on a scheduler.

The class has 1 method   (Execute)  which runs upon execution of the class.

This is an example :

global class Your_Class_Name implements Schedulable{

global void execute(SchedulableContext SC) {
             
          //  The code for execution
   }

}
This was selected as the best answer
subrat pandasubrat panda
Thank you Elad .