+ Start a Discussion
HarryHHHarryHH 

Scheduling Batch Apex

Hello,

 

I'm quite new to developing Apex and Visualforce. My actual challenge is to schedule a batch apex class called "Bestellungsbatch". I tried to call this batch with the following class to then be able to schedule this class by the schedule Apex Page "Setup -> monitoring -> scheduled jobs":

 

global class scheduledBestellungsBatch implements Schedulable
{
    global void execute(SchedulableContext sc)
    {
        Bestellungsbatch b = new Bestellungsbatch();
        b.query = 'Select ID, Name, Artikel__c, Datum__c, Auftragsposition__c from Bedarf__c';
        b.email = 'klose@klosesrockepartner.de';
        database.executebatch(b);
    }
}

 

If I now got to Setup -> Monitoring -> Scheduled Jobs nothing is shown. I think something is missing. Has anyone an idea how I can schedule this job?

 

Thanks

Harry

Best Answer chosen by Admin (Salesforce Developers) 
Imran MohammedImran Mohammed

You can schedule a class manually by going to setup --> Develop --> Apex Classes. and click schedule apex button.

All Answers

Imran MohammedImran Mohammed

You can schedule a class manually by going to setup --> Develop --> Apex Classes. and click schedule apex button.

This was selected as the best answer
HarryHHHarryHH

That worked. Thanks a lot. Simply didn't find the right button to plan the scheduling.

 

Harry