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
Yossi 4Yossi 4 

HTTP from Schedule Apex Class with Nested @future

<BS"D>
Hello,
I am trying to run a scheduled apex class that 
1. Collects information through an http request
2. Upsert the collected contacts into the Contacts object
Using the @future(callout=true) token, I am able to run the first step, getting the info from an API. However, since contacts have a trigger with an @future token too, I am getting an error regarding nested @future . Any ideas? Maybe the @future token is not the only way to enable callouts from a scheduled apex class?
ShashankShashank (Salesforce Developers) 
Here's a workaround that might help: http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/