You need to sign in to do that
Don't have an account?

How to use @future with a schedulable class?
Hi,
I currently have a schedulable class that is scheduled to run on a nightly basis. However, it will be using SOQL queries that can return more than 50,000 records. I was thinking of using the '@future' call, but was not sure if it works as my test results have been inconclusive. here is what I am trying to do and wanted to know if it will be able to process more than 50,000 if it comes to it
public class Test implements Schedulable(SchedulableContext sc){
@future
public function() {
//some operations which may return greater than 50,000 records
List<Contact> newCnt = [Select Id From Contact]
}
}//end class
thanks,
http://www.forcexplore.com/2014/01/salesforce-interview-questions-part-i.html