The new scheduler cron command for Drush 9 has the following error:

Error: Call to a member function runLightweightCron() on null
in Drupal\scheduler\Commands\SchedulerCommands->cron()
(line 59 of scheduler/src/Commands/SchedulerCommands.php)

The code was introduced in #2951072: Provide Scheduler drush commands for Drush 9 but has a simple typo on the line

$this->manager->runLightweightCron($options);

which should be

$this->schedulerManager->runLightweightCron($options);

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new614 bytes

Here is the fix.
Our phpunit tests do not cover drush commands so this error was not detected.

  • jonathan1055 committed fb3bf5e on 8.x-1.x
    Issue #3078674 by jonathan1055: Call to function runLightweightCron() on...
jonathan1055’s picture

Status: Needs review » Fixed

Fixed.
The tests will be added in #3079133: Add Phpunit test to check Drush commands

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.