Runtime Error: Algorithm took longer than 10 minutes I’m encountering this runtime error on QuantConnect:

Algorithm took longer than 10 minutes on a single time loop.

I’ve already moved all of the heavy work—processing daily bars for ~700 universes and generating indicators—out of OnData() and into an End‑of‑Day scheduled event (1 minute after market close), but the error persists.

Proposed solution:

Split the daily‑bar processing into three smaller scheduled tasks:

Process the first ~250 symbols at 1 minute after close

Process the next ~250 symbols at 11 minutes after close

Process the remaining ~200 symbols at 21 minutes after close

Will this batching strategy help me stay within the 10‑minute loop limit and follow best practices for load‑balancing heavy work? I’m open to any other suggestions if this staggered schedule isn’t optimal.

def on_data(self, data):
        """Cache daily bars and update VIX values."""
        if self.vix in data:
def process_daily_bars_1(self):
        """Process cached daily bars after market close."""
        if self.IsWarmingUp or not self.daily_bars:
            return
        batch = dict(islice(self.daily_bars.items(), batch_size))    
        self._process_slice(batch)
        
def process_daily_bars_2(self):
        """Process cached daily bars after market close."""
        if self.IsWarmingUp or not self.daily_bars:
            return
        batch = dict(islice(self.daily_bars.items(), 251, 251 + batch_size))    
        self._process_slice(batch)        

self.Schedule.On(
            self.DateRules.EveryDay(),
            self.TimeRules.AfterMarketClose("SPY", 1),
            self.process_daily_bars_1
        )
        self.Schedule.On(
            self.DateRules.EveryDay(),
            self.TimeRules.AfterMarketClose("SPY", 11),
            self.process_daily_bars_2
        )