Hmbown/CodeWhale · error · anyhow::Error
Unsupported RRULE FREQ
Error message
Unsupported RRULE FREQ '{other}'. Supported: ONCE, HOURLY, WEEKLY, and CRON What it means
The RRULE schedule parser in automation_manager only accepts FREQ values ONCE, HOURLY, WEEKLY, and CRON. Any other FREQ token (e.g. DAILY, MONTHLY, YEARLY, or a misspelled value) hits the catch-all arm and aborts parsing. Standard RFC-5545 frequencies beyond the supported subset are intentionally rejected.
Solutions
- Change FREQ to one of ONCE, HOURLY, WEEKLY, or CRON in the RRULE string
- Use FREQ=CRON with a cron expression if you need daily/monthly-style scheduling
- Check casing: FREQ values are matched in exact uppercase
Example fix
// before RRULE:FREQ=DAILY;BYHOUR=9 // after RRULE:FREQ=CRON;BYHOUR=9 (or restructure as HOURLY/WEEKLY per supported grammar)
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_FREQ = ["ONCE", "HOURLY", "WEEKLY", "CRON"];
const freq = rule.match(/FREQ=([A-Z]+)/)?.[1];
if (!freq || !SUPPORTED_FREQ.includes(freq)) throw new Error(`FREQ must be one of ${SUPPORTED_FREQ.join(", ")}`); Type guard
function isSupportedFreq(v: string): v is "ONCE"|"HOURLY"|"WEEKLY"|"CRON" {
return ["ONCE","HOURLY","WEEKLY","CRON"].includes(v);
} Try / catch
try {
schedule = parse_rrule(rule)?;
} catch e if e.to_string().contains("Unsupported RRULE FREQ") {
eprintln!("{e}; rewrite the rule with a supported FREQ");
} Prevention
- Keep a dropdown/enum in the UI instead of free-text FREQ
- Validate RRULE strings at save time, not only at load time
- Uppercase-normalize user input before parsing
When it happens
Trigger: Parsing an automation RRULE string whose FREQ= is anything other than ONCE/HOURLY/WEEKLY/CRON, e.g. 'RRULE:FREQ=DAILY;BYHOUR=9' or a typo like 'FREQ=Hourly' (case-sensitive match).
Common situations: Users copy a standard calendar RRULE (DAILY/MONTHLY) from another tool; hand-written schedules with wrong casing; migrating automations from a cron/iCal system that supports more frequencies than this scheduler.
Related errors
- BYDAY cannot be empty for WEEKLY schedules
- Invalid BYDAY value
- Unsupported RRULE field
- Unsupported RRULE field
- Unsupported RRULE field
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/0bfc0206329ec9a0.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/automation_manager.rs:363
continue;
}
let Some((k, v)) = item.split_once('=') else {
bail!("Invalid RRULE segment '{item}'");
};
parts.insert(k.trim().to_ascii_uppercase(), v.trim().to_string());
}
let freq = match parts
.get("FREQ")
.map(|value| value.trim().to_ascii_uppercase())
.as_deref()
{
Some("ONCE") => return parse_once_schedule(&parts),
Some("HOURLY") => AutomationFrequency::Hourly,
Some("WEEKLY") => AutomationFrequency::Weekly,
Some("CRON") => return parse_cron_schedule(&parts),
Some(other) => {
bail!("Unsupported RRULE FREQ '{other}'. Supported: ONCE, HOURLY, WEEKLY, and CRON")
}
None => bail!("RRULE must include FREQ"),
};
match freq {
AutomationFrequency::Hourly => {
for key in parts.keys() {
if key != "FREQ"
&& key != "INTERVAL"
&& key != "BYDAY"
&& key != "BYHOUR"
&& key != "BYMINUTE"
{
bail!(
"Unsupported RRULE field '{key}' for HOURLY. Allowed: FREQ,INTERVAL,BYDAY,BYHOUR,BYMINUTE"
);
}
}View on GitHub (pinned to 73e0f67d83)