i have created a schedulable class which has to trigger a batch job. The run method for the batch class will get list of data to process from a webservice callout. Now, i got the exception below. Any suggestions please.

System.CalloutException: Callout from scheduled Apex not supported.

global class scheduledDeltaBatchable implements Schedulable {
   global void execute(SchedulableContext sc) {
    ID batchprocessid = BatchUpsertSAPCustomerMasterBPSync.run(SAPServices.GetSAPCustomerMasterBPSync('Delta'));

1 Answer 1


If you want to do it in the schedule class you will need to do it in an @future method:


or here on stack exchange:

Scheduled Apex, Callouts and Running a Batch

Why not just perform the callout in your Batch Apex start method? This means you will always start the Batch Apex job from your Scheduled apex job, but i think is on balance better than having to marshall schedule jobs between @future jobs?

if you want to do it within the batch that is ran by the schedule you will need to implement the callout interface

global class scheduledDeltaBatchable implements Schedulable, Database.AllowsCallouts

To use a callout in batch Apex, specify Database.AllowsCallouts in the class definition


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.