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

Callout from scheduled Apex not supported.

I have a batch Apex class that makes callout in the executeBatch() method. And I need to schedule this batch to run sometime in the future. So I tried to use a Schedulable class to schedule it. But when I test, I get this error:
Callout from scheduled Apex not supported.

So I search and found a post that says to use @future. So I added that in my schedulable class. But then I get this error:
Database.executeBatch cannot be called from a batch start, batch execute, or future method.

Can someone help me find a solution? Thanks a lot. 
Balaji BondarBalaji Bondar
Hi Sdu,

Use the @future annotation. See
Hi sdu ,
Can you check your batch class api version it should be mininum 27.0 .

Thansk ,