Though schedule jobs are run in the background using queues, it is possible to create very resource intensive queries to return in your custom code. The examples in the
Procedure – Creating Custom Schedule Jobs section showed one technique of using paging to help avoid problems caused by dealing with large result sets. Be sure your custom schedule jobs are tested on production-like datasets. What works for cases where the result is 100 does not always work as well when you have 10’s or 100’s of thousands of results.