- Issue created by @claudiu.cristea
I was looking for something similar, based on https://mglaman.dev/blog/using-reactphp-run-drupal-tasks. In my case I wanted to be able to run arbitrary tasks, not only the Advanced Queue processor. So, I've created
https://www.drupal.org/project/recurring_task →
which has some features more than advancedqueue_runner
:
drush advancedqueue:queue:process
. You can configure any Drush or non-Drush file tHat executes PHP.[drupal:root]
for the absolute path to the Drupal webtoot and [drupal:url]
for the site's base URL.
// Define a recurring task that rebuilds the cache each 5 minutes.
$runner = RecurringTaskRunner::create(
'id' => 'cache_rebuild',
'label' => 'Cache rebuild',
'command' => '[drupal:root]/../vendor/bin/drush',
'params' => 'cache:rebuild',
'interval' => 300,
'auto_restart' => TRUE,
);
$runner->save();
$runner->start();
// OR
$runner->stop();
Future planned improvements:
exec()
command.This module makes advancedqueue_runner
obsolete as is very easy to create a task that runs drush advancedqueue:queue:process
. Please consider deprecating this module and let's join forces to maintain the other, more generic module. At least I would be very happy if you can give it a try.
Active
2.0
Miscellaneous