+ Start a Discussion
Edwin KEdwin K 

Batch Callout Limit



I have a scheduled job which is batch apex that call external web service.. My case is I want to call external web service 10 times per batch execution where schedule run.. Example, 11 o'clock -> run batch which calling external web service 10 times, 12 o'clock -> same process and so on... Is this possible? I have done that and the result is the first batch run successfully calling web service 10 times, second batch run -> I got exception -> First error: Too many callouts: 2, third, and so on has the same error message...

For the information, I wan to call the web service to get the values returned and updated to Salesforce.com records..

Any suggestions would be great...



It's not possible.  You are only allowed one callout per batch execute() method invocation. 


You would have to change your batch job to account for this.