{"record":{"id":"194cf48fe9c3fc72","repo":"jdx/mise","slug":"agent-agent-name-start-calendar-interval-mus-194cf4","errorCode":null,"errorMessage":"agent '{agent_name}' `start_calendar_interval` must not be empty","messagePattern":"agent '(.+?)' `start_calendar_interval` must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/launchd.rs","lineNumber":191,"sourceCode":"        {\n            bail!(\"agent '{agent_name}' `start_calendar_interval` must set at least one field\");\n        }\n        validate_range(agent_name, \"minute\", self.minute, 0, 59)?;\n        validate_range(agent_name, \"hour\", self.hour, 0, 23)?;\n        validate_range(agent_name, \"day\", self.day, 1, 31)?;\n        validate_range(agent_name, \"weekday\", self.weekday, 0, 7)?;\n        validate_range(agent_name, \"month\", self.month, 1, 12)?;\n        Ok(())\n    }\n}\n\nimpl LaunchdCalendarIntervals {\n    fn validate(&self, agent_name: &str) -> Result<()> {\n        match self {\n            Self::Single(interval) => interval.validate(agent_name),\n            Self::Multiple(intervals) => {\n                if intervals.is_empty() {\n                    bail!(\"agent '{agent_name}' `start_calendar_interval` must not be empty\");\n                }\n                for interval in intervals {\n                    interval.validate(agent_name)?;\n                }\n                Ok(())\n            }\n        }\n    }\n}\n\nfn validate_range(\n    agent_name: &str,\n    field: &str,\n    value: Option<u8>,\n    min: u8,\n    max: u8,\n) -> Result<()> {\n    if let Some(value) = value","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/launchd.rs#L173-L209","documentation":"Thrown when `start_calendar_interval` is provided as a list and that list is empty. launchd cannot schedule anything from an empty array of calendar intervals, so the library rejects it during validation. Providing the key at all signals intent to schedule, so an empty list is a configuration error rather than a no-op.","triggerScenarios":"Declaring `start_calendar_interval = []` (an empty multiple-interval list) in an agent's system configuration; programmatically building the intervals array and leaving it with zero entries.","commonSituations":"Templated configs where the intervals list is generated from variables that resolved to nothing; users removing all list entries intending to disable scheduling; copy-paste of a multi-entry example with entries deleted.","solutions":["Add at least one calendar interval object to the list, each with at least one field (e.g. `[{ minute = 0, hour = 3 }]`).","If scheduling should be disabled, remove the `start_calendar_interval` key entirely.","Check any template/tooling that generates the list to ensure at least one interval is emitted or the key is omitted."],"exampleFix":"# before\n[agents.backup.system]\nstart_calendar_interval = []\n\n# after\n[agents.backup.system]\nstart_calendar_interval = [{ minute = 0, hour = 3 }]","handlingStrategy":"validation","validationCode":"function validateIntervals(intervals) {\n  if (Array.isArray(intervals) && intervals.length === 0) {\n    throw new Error('start_calendar_interval must not be empty');\n  }\n}","typeGuard":"function nonEmptyIntervals(v) {\n  return Array.isArray(v) && v.length > 0 ? v : null;\n}","tryCatchPattern":null,"preventionTips":["Omit start_calendar_interval entirely when no schedule is desired.","Ensure template generators either emit >=1 interval or drop the key.","Lint agent configs for empty arrays."],"tags":["launchd","config","validation","scheduling"],"backgroundTag":"empty-required-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}