job scheduler rules undefined index

Created on 31 July 2019, almost 5 years ago
Updated 8 February 2024, 5 months ago

Hello,

If i change

scheduler:
  id: simple
  configuration:
    rules:
      - '*/5+@ * * * *'

to anything else (except */15+@ * * * * ) for example to 0 12 * * 7 i get an error
Undefined index: 0 12 * * * in Drupal\ultimate_cron\Plugin\ultimate_cron\Scheduler\Simple->formatLabel()

if i try to set the settings with UI, they don't seem to save properly and shows scheduled every 0 seconds.

Am i doing something wrong? Thank you for any help!

🐛 Bug report
Status

Needs work

Version

2.0

Component

Miscellaneous

Created by

🇱🇹Lithuania edcka

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 7 months ago
    32 pass
  • 🇧🇪Belgium LRoels Ghent

    Seems to work on the latest version.
    IMO something we should get in as not everyone is using the default interval settings.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 7 months ago
    32 pass
  • 🇧🇪Belgium LRoels Ghent

    Rebased to make sure the latest version is still working.

  • Status changed to Needs work 5 months ago
  • 🇨🇭Switzerland Berdir Switzerland

    You are not meant to be using the simple scheduler with custom cron rules, only predefined presets are supported. For custom rules, use the crontab scheduler.

    You won't be able to edit this and will lose your settings if you ever edit and save this. There should possibly be some kind of validation for this, this doesn't seem like a complete fix.

  • 🇧🇪Belgium LRoels Ghent

    Fair point. I got this error while using some config that had this applied on the simple scheduler.

    Conclusion: The feature in the initial issue is already in place if you use the crontab scheduler.

    Config validation should be able to catch the unsupported simple options.
    If the validation is in place, the above fix should not be necessary anymore.

Production build 0.69.0 2024