{"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":"warning","filePath":"src/system/launchd.rs","lineNumber":158,"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":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/launchd.rs#L140-L176","documentation":"`start_calendar_interval` schedules an agent like a cron entry via launchd's StartCalendarIntervals. In its single-table form every field (minute, hour, day, weekday, month) is optional, but at least one must be set or the interval would match nothing meaningful to mise's validation; LaunchdCalendarInterval::validate bails when all are None (src/system/launchd.rs:158). The agent is skipped with a warning.","triggerScenarios":"`[bootstrap.macos.launchd.agents.x.start_calendar_interval]` present as an empty table with no keys inside, e.g. declaring the section header but never filling in a time field.","commonSituations":"Starting to configure a schedule and abandoning it mid-edit; scaffolding agent tables from a template that includes an empty interval block; commenting out fields but leaving the header.","solutions":["Add at least one field, e.g. `hour = 9` (daily at 09:00) or `minute = 30`","For a full schedule combine fields: `minute = 0, hour = 9, weekday = 1` (Mondays 09:00)","Remove the empty `start_calendar_interval` block if no schedule is intended"],"exampleFix":"# before (mise.toml)\n[bootstrap.macos.launchd.agents.x.start_calendar_interval]\n\n# after\n[bootstrap.macos.launchd.agents.x.start_calendar_interval]\nhour = 9\nminute = 0","handlingStrategy":"validation","validationCode":"import tomllib\ncfg = tomllib.load(open(\"mise.toml\",\"rb\"))\nFIELDS = {\"minute\",\"hour\",\"day\",\"weekday\",\"month\"}\nfor name, agent in cfg.get(\"bootstrap\",{}).get(\"macos\",{}).get(\"launchd\",{}).get(\"agents\",{}).items():\n    iv = agent.get(\"start_calendar_interval\")\n    if isinstance(iv, dict):\n        assert FIELDS & set(iv), f\"agent {name}: start_calendar_interval sets no field\"","typeGuard":"def interval_has_field(iv: dict) -> bool:\n    return bool({\"minute\",\"hour\",\"day\",\"weekday\",\"month\"} & set(iv))","tryCatchPattern":null,"preventionTips":["Always include at least one time field in a calendar interval","Delete the interval header if you are not scheduling yet","Prefer `hour` + `minute` for daily jobs; add `weekday` for weekly"],"tags":["mise","launchd","macos","bootstrap","scheduling"],"backgroundTag":"cron-schedule-validation","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}