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
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 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.