You need to sign in to do that
Don't have an account?
test777
Urgent:Scheduling an apex class for each 5 minutes
Hi all,
i am new to apex scheduling class.I need to write apex class for scheduling each 5 minutes.Any one can u please help me this.
Thanks in advance.
anu
Hi ,
To invoke Apex classes to run at specific times, first implement the Schedulable interface for the class, then specify the schedule using either the Schedule Apex page in the Salesforce user interface, or theSystem.schedule method.
For more information about the Schedule Apex page, see “Scheduling Apex” in the Salesforce online help.
Implementing the Schedulable Interface
To schedule an Apex class to run at regular intervals, first write an Apex class that implements the Salesforce-provided interface Schedulable.
The scheduler runs as system: all classes are executed, whether the user has permission to execute the class or not. For more information on setting class permissions, see “Apex Class Security Overview” in the Salesforce online help.
The Schedulable interface contains one method that must be implemented, execute.
Helpful links:-
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
You must keep in mind the batch apex limits as you may hit the limits by scheduling the batch apex after every 5 mins.
Cursor limits for different Force.com features are tracked separately. For example, you can have five Apex query cursors, five batch cursors, and five Visualforce cursors open at the same time.