O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing Schedulable Code

An Apex class that can be scheduled by Force.com must implement the Schedulable interface. The interface requires no methods to be implemented; it simply indicates to the platform that your class can be scheduled. Code that is executed by the scheduler runs as the system user, so sharing rules or other access controls are not enforced. At most, ten classes can be scheduled at one time.

The class in Listing 9.8 enables the Batch Apex example from Listing 9.1 to be schedulable. It does this by implementing the Schedulable interface, which has a single method: execute. Although you could implement this interface directly on your batch class, the best practice recommended by Salesforce is to create a separate Schedulable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required