influxdata/influxdb · error · PluginError

cron schedule never triggers

Error message

cron schedule never triggers: {0}

What it means

PluginError::CronScheduleNeverTriggers means a schedule-based processing engine plugin's cron expression parses but never produces a next trigger time (e.g. a date-specific schedule like '0 0 30 2 *' — Feb 30 — or a schedule whose date window has passed). The library throws it when validating or starting a scheduled trigger whose cron cannot ever fire.

Solutions

  1. Fix the cron expression so it can fire, e.g. use '0 0 * 2 *' or a recurring pattern instead of an impossible date like '0 0 30 2 *'.
  2. Validate the schedule with the cron crate (schedule.upcoming(Utc).next()) before creating the trigger.
  3. If a one-time past schedule was intended, recreate the trigger with a future datetime-based schedule.

Example fix

// before
CREATE TRIGGER "feb" ON ... FOR EACH ... SCHEDULE '0 0 30 2 *'
// after
CREATE TRIGGER "feb" ON ... FOR EACH ... SCHEDULE '0 0 * 2 *'
Defensive patterns

Strategy: validation

Validate before calling

use cron::Schedule;
use chrono::Utc;
fn schedule_can_fire(expr: &str) -> bool {
    expr.parse::<Schedule>().ok()
        .and_then(|s| s.upcoming(Utc).next())
        .is_some()
}

Type guard

fn is_valid_cron(expr: &str) -> bool { cron::Schedule::from_str(expr).is_ok() }

Prevention

When it happens

Trigger: Creating or enabling a plugin trigger whose cron string is syntactically valid via the cron crate but yields an empty iterator of trigger times, e.g. day-of-month 30/31 combined with February, or a past-bounded schedule.

Common situations: Operators hand-write cron strings in trigger definitions for influxdb3 scheduled plugins and use impossible date combinations; copy-pasted schedules referencing fixed dates that already passed.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/1b0e78259bf94bcb. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_processing_engine/src/plugins.rs:59

    #[error(transparent)]
    PyError(#[from] pyo3::PyErr),

    #[error(transparent)]
    WriteBufferError(#[from] write_buffer::Error),

    #[error(transparent)]
    AnyhowError(#[from] anyhow::Error),

    #[error("reading plugin file: {0}")]
    ReadPluginError(#[from] std::io::Error),

    #[error("error executing plugin: {0}")]
    PluginExecutionError(#[from] influxdb3_py_api::error::ExecutePluginError),

    #[error("invalid cron syntax: {0}")]
    InvalidCronSyntax(#[from] cron::error::Error),

    #[error("cron schedule never triggers: {0}")]
    CronScheduleNeverTriggers(String),

    #[error("non-schedule plugin with schedule trigger: {0}")]
    NonSchedulePluginWithScheduleTrigger(String),

    #[error("error fetching plugin from repository: {0} {1}")]
    FetchingFromRepository(reqwest::StatusCode, String),

    #[error(
        "plugin installation is disabled; plugins must already exist in the configured plugin directory"
    )]
    PluginInstallationDisabled,

    #[error("Join error, please report: {0}")]
    JoinError(#[from] tokio::task::JoinError),

    #[error("Node not configured with plugin directory")]
    NoPluginDir,

View on GitHub (pinned to 06200ef96b)