A developer can now employ batch Apex to build complex, long-running processes on the Force.com platform. For example, a developer could build an archiving solution that runs on a nightly basis, looking for records past a certain date and adding them to an archive. Or a developer could build a data cleansing operation that goes through all Accounts and Opportunities on a nightly basis and reassigns them if necessary, based on custom criteria.
Batch Apex is exposed as an interface that must be implemented by the developer.
Batch jobs can be programmatically invoked at runtime using Apex.
You can only have five queued or active batch jobs at one time. You can evaluate your current count by viewing the Scheduled Jobs page in Salesforce.com or programmatically using the Force.com Web services API to query the AsyncapexJob object.
To use batch Apex, you must write an Apex class that implements the Salesforce.com-provided interface Database.Batchable , and then invoke the class programmatically.
ApexScheduler
To invoke Apex classes to run at specific times, first implement the Schedulable interface for the class, then specify the schedule using either the ScheduleApex page in the Salesforce.com user interface, or the System.schedule method.
Batch Apex
A developer can now employ batch Apex to build complex, long-running processes on the Force.com platform. For example, a developer could build an archiving solution that runs on a nightly basis, looking for records past a certain date and adding them to an archive. Or a developer could build a data cleansing operation that goes through all Accounts and Opportunities on a nightly basis and reassigns them if necessary, based on custom criteria.
Batch Apex is exposed as an interface that must be implemented by the developer.
Batch jobs can be programmatically invoked at runtime using Apex.
You can only have five queued or active batch jobs at one time. You can evaluate your current count by viewing the Scheduled Jobs page in Salesforce.com or programmatically using the Force.com Web services API to query the AsyncapexJob object.
To use batch Apex, you must write an Apex class that implements the Salesforce.com-provided interface Database.Batchable , and then invoke the class programmatically.
Apex Scheduler
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.com user interface, or the System.schedule method.