Drush and cron import fails during stop_times migration on memory or execution-time constrained environments
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3584481. --> Reported by: [jamesfmcgrath](https://www.drupal.org/user/546314) >>> <p><strong>Problem</strong></p> <p>The Drush and cron import paths call runAllMigrations() which processes stop_times via MigrateExecutable in a single PHP process. On standard hosting environments this exhausts PHP memory or hits max_execution_time before stop_times complete. The import log entry is never written as it only records on clean completion, making failures difficult to diagnose.</p> <p>The cron schedule check uses a strict minute-match against the configured expression, meaning on environments where cron does not fire at an exact minute the import window can be missed entirely.</p> <p><strong>Proposed resolution</strong></p> <ul> <li>Replace the MigrateExecutable stop_times block in runAllMigrations() with a loop using the existing processStopTimesChunk() method (10,000 rows per iteration), consistent with the web batch path.</li> <li>Update the cron schedule check to fall back to a time-window match when no valid expression is configured, ensuring the import is not missed on environments without minute-level cron precision.</li> </ul>
issue