Add scheduler support

Created on 13 September 2023, over 1 year 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

Active

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 over 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

  • Status changed to Needs work 4 days ago
  • MR!9 didn't work for me. Cron is not running, publishing is still not happening at scheduled time. It still shows unpublished.
    I've been waiting for this to be resolved for a long time, I was hoping it would be fixed with version 1.4 but the same problem persists. Thanks

Production build 0.71.5 2024