{"record":{"id":"11cd101140f57aec","repo":"jdx/mise","slug":"agent-agent-name-start-calendar-interval-mus","errorCode":null,"errorMessage":"agent '{agent_name}' `start_calendar_interval` must set at least one field","messagePattern":"agent '(.+?)' `start_calendar_interval` must set at least one field","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/launchd.rs","lineNumber":174,"sourceCode":"            queue_directories: config.queue_directories,\n            environment: config.environment,\n            working_directory: config.working_directory,\n            stdout_path: config.stdout_path,\n            stderr_path: config.stderr_path,\n            kickstart: config.kickstart,\n        })\n    }\n}\n\nimpl LaunchdCalendarInterval {\n    fn validate(&self, agent_name: &str) -> Result<()> {\n        if self.minute.is_none()\n            && self.hour.is_none()\n            && self.day.is_none()\n            && self.weekday.is_none()\n            && self.month.is_none()\n        {\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                }","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/launchd.rs#L156-L192","documentation":"This error is thrown during launchd agent plist validation when a `StartCalendarInterval` entry has no calendar fields set at all. launchd requires at least one of minute, hour, day, weekday, or month to be specified; an entry with none of them would never fire and is treated as a config mistake. The library fails fast at validation rather than installing a broken agent.","triggerScenarios":"Declaring a launchd agent with `start_calendar_interval` set to an object where every field (minute, hour, day, weekday, month) is None/omitted; e.g. `[agents.x.system] start_calendar_interval = {}` or an empty table entry.","commonSituations":"Hand-editing a mise.toml agent definition and leaving a placeholder empty table; deleting all fields from a schedule intending to disable it instead of removing the key; copying an example config and stripping fields.","solutions":["Set at least one calendar field, e.g. `minute = 0` and `hour = 3` for a 3:00 AM daily run.","If you meant to disable the schedule, remove the entire `start_calendar_interval` key instead of emptying it.","If you want interval-based rather than calendar-based scheduling, use `start_interval` (seconds) instead.","Run the config through validation locally (e.g. `mise doctor` or the relevant validate path) before applying the agent."],"exampleFix":"# before\n[agents.backup.system.start_calendar_interval]\n\n# after\n[agents.backup.system.start_calendar_interval]\nminute = 0\nhour = 3","handlingStrategy":"validation","validationCode":"const REQUIRED_FIELDS = ['minute','hour','day','weekday','month'];\nfunction validateCalendarInterval(interval) {\n  if (!REQUIRED_FIELDS.some(f => interval[f] !== undefined)) {\n    throw new Error('start_calendar_interval must set at least one field');\n  }\n}","typeGuard":"function hasCalendarField(i) {\n  return ['minute','hour','day','weekday','month'].some(f => i?.[f] !== undefined);\n}","tryCatchPattern":null,"preventionTips":["Always set at least minute or hour when using start_calendar_interval.","Disable schedules by removing the key, not emptying it.","Validate agent config with mise before applying."],"tags":["launchd","config","validation","scheduling"],"backgroundTag":"missing-required-config-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"}