function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
minciminci 

How to sule Batch apex class?

Strange but when i am trying to choose a class to be schedules by salesforce

I van not choose a Batchable class.

Is there any other way runnung batch Apex? In all tutorials it is clearly said:

"Run you batchable class using the scheduler"! what am i missing?

Regrads,

bob_buzzardbob_buzzard

For a class to be scheduled it needs to implement the Schedulable interface.  Your schedulable class would normally instantiate and execute the batch apex.

 

The example below is straight out of the Apex Developer's Guide:

 

----------

 

 

You can also use the Schedulable interface with batch Apex classes. The following example implements the Schedulable
interface for a batch Apex class called batchable:

You can also use the Schedulable interface with batch Apex classes. The following example implements the Schedulable interface for a batch Apex class called Batchable:

 

 

 

global class scheduledBatchable implements Schedulable{
   global void execute(SchedulableContext sc) {
   Batchable b = new Batchable();
   database.executebatch(b);
   }
}