Problem/Motivation

Running ultimate_cron by system cron currently requires drush. Using drupal console cron call does not work as drupal console reinvented the wheel by writing their own cron call implementation (more or less copy pasting the actual core CronInterface logic).

Proposed resolution

Add drupal console command to call ultimate cron directly (actually adding a command which calls the defined CronInterface).

Comments

attisan created an issue. See original summary.

attisan’s picture

Status: Active » Needs review
StatusFileSize
new2.1 KB

Remaining tasks

review, tests and readme

calling cron like $ drupal ultimate_cron:run

levmyshkin’s picture

Patch #2 works pretty well for me.

blacklabel_tom’s picture

Tested against alpha4 and works perfectly for me.

One enhancement could be to list out the jobs that have been run in the console output, but #2 is enough for me for now.

Cheers

Tom

blacklabel_tom’s picture

Status: Needs review » Reviewed & tested by the community
rauch’s picture

On Drupal 9.2.6 and drupal-console 1.9.7 the patch doesn't work anymore. The patch is applied but the command "ultimate_cron:run" is unknown.

[ERROR] Command "ultimate_cron:run", is not a valid command name.

rauch’s picture

The problem seemed to be the annotation:
@DrupalCommand
With following annotation the command works again:
Drupal\Console\Annotations\DrupalCommand

attisan’s picture

thx for the find 💪

berdir’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Correct me if I'm wrong, but I think drupal console is pretty unmaintained now and everyone switched back to drush? Therefore not going to add that to the project as something that would need be maintained and updated.