Add scheduler support

Created on 13 September 2023, about 1 year ago
Updated 19 September 2024, about 2 months ago

Problem/Motivation

Some sites may want to schedule the publishing of their storage entities. It appears that making this possible requires providing a small plugin with the necessary annotation data.

Proposed resolution

Implement a class that extends SchedulerPluginBase.

Feature request
Status

Needs review

Version

1.3

Component

Code

Created by

🇨🇦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mandclu
  • @mandclu opened merge request.
  • Status changed to Needs review about 1 year ago
  • 🇨🇦Canada mandclu

    The code provided in the merge requests worked for me.

  • 🇨🇦Canada noah

    This patch was working well for us with Scheduler 2.0.*, but since updating to 2.1.0 we're every cron run failing to complete, and this error appearing in the log:

    Error: Class "Drupal\scheduler\Event\SchedulerStorageEvents" not found in constant() (line 177 of /path/to/drupal/web/modules/contrib/scheduler/src/SchedulerManager.php)

    I had a look at the changelog for the Scheduler 2.1.0 realease, and I don't see anything obvious:

    https://www.drupal.org/project/scheduler/releases/2.1.0

    For now I've made the problem go away by just removing scheduling from the storage type (I didn't have to uninstall Scheduler). I'll make some time to see what I can do to address this, but if anyone else wants to take a look it looks like the patch being developed for scheduling Paragraphs might point in the right direction:

    https://www.drupal.org/project/scheduler/issues/3312200 Paragraph scheduler plugin Needs work

Production build 0.71.5 2024