{"record":{"id":"7b7a6074441d5ce3","repo":"tinyhumansai/openhuman","slug":"no-future-occurrence-for-expression-expr","errorCode":null,"errorMessage":"No future occurrence for expression: {expr}","messagePattern":"No future occurrence for expression: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/cron/schedule.rs","lineNumber":123,"sourceCode":"        match tz {\n            Some(tz_name) => chrono_tz::Tz::from_str(tz_name)\n                .map(Self::Named)\n                .with_context(|| format!(\"Invalid IANA timezone: {tz_name}\")),\n            None => Ok(Self::Local),\n        }\n    }\n\n    fn next_after(\n        self,\n        cron: &CronExprSchedule,\n        from: DateTime<Utc>,\n        expr: &str,\n    ) -> Result<DateTime<Utc>> {\n        match self {\n            Self::Named(timezone) => {\n                let localized_from = from.with_timezone(&timezone);\n                let next_local = cron.after(&localized_from).next().ok_or_else(|| {\n                    anyhow::anyhow!(\"No future occurrence for expression: {expr}\")\n                })?;\n                Ok(next_local.with_timezone(&Utc))\n            }\n            Self::Local => {\n                let localized_from = from.with_timezone(&chrono::Local);\n                let next_local = cron.after(&localized_from).next().ok_or_else(|| {\n                    anyhow::anyhow!(\"No future occurrence for expression: {expr}\")\n                })?;\n                Ok(next_local.with_timezone(&Utc))\n            }\n        }\n    }\n\n    fn local_time_of_day(self, time: DateTime<Utc>) -> NaiveTime {\n        match self {\n            Self::Named(timezone) => {\n                let localized = time.with_timezone(&timezone);\n                NaiveTime::from_hms_opt(localized.hour(), localized.minute(), 0)","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/cron/schedule.rs#L105-L141","documentation":"A cron expression produced no upcoming occurrence in the job's timezone — the schedule iterator yielded None when advancing. Fires for expressions whose future matches are impossible in that timezone (e.g. a time that never occurs due to DST or an unsatisfiable field combination), not for parse errors.","triggerScenarios":"Thrown at src/openhuman/cron/schedule.rs:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the cron expression so it has future occurrences in the configured timezone","Verify the IANA timezone name is the intended one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}