NousResearch/hermes-agent · error · ValueError

Invalid schedule '{original}'. Use: - Duration: '30m', '2h

Error message

Invalid schedule '{original}'. Use:
  - Duration: '30m', '2h', '1d' (one-shot)
  - Interval: 'every 30m', 'every 2h' (recurring)
  - Cron: '0 9 * * *' (cron expression)
  - Timestamp: '2026-02-03T14:00:00' (one-shot at time)

What it means

Error "Invalid schedule '{original}'. Use: - Duration: '30m', '2h', '1d' (one-shot) - Interval: 'every 30m', 'every 2h' (recurring) - Cron: '0 9 * * *' (cron expression) - Timestamp: '2026-02-03T14:00:00' (one-shot at time)" thrown in NousResearch/hermes-agent.

Source

Thrown at cron/jobs.py:703

                "run_at": dt.isoformat(),
                "display": f"once at {dt.strftime('%Y-%m-%d %H:%M')}"
            }
        except ValueError as e:
            raise ValueError(f"Invalid timestamp '{schedule}': {e}")
    
    # Duration like "30m", "2h", "1d" → one-shot from now
    try:
        minutes = parse_duration(schedule)
        run_at = _hermes_now() + timedelta(minutes=minutes)
        return {
            "kind": "once",
            "run_at": run_at.isoformat(),
            "display": f"once in {original}"
        }
    except ValueError:
        pass
    
    raise ValueError(
        f"Invalid schedule '{original}'. Use:\n"
        f"  - Duration: '30m', '2h', '1d' (one-shot)\n"
        f"  - Interval: 'every 30m', 'every 2h' (recurring)\n"
        f"  - Cron: '0 9 * * *' (cron expression)\n"
        f"  - Timestamp: '2026-02-03T14:00:00' (one-shot at time)"
    )


def _ensure_aware(dt: datetime) -> datetime:
    """Return a timezone-aware datetime in Hermes configured timezone.

    Backward compatibility:
    - Older stored timestamps may be naive.
    - Naive values are interpreted as *system-local wall time* (the timezone
      `datetime.now()` used when they were created), then converted to the
      configured Hermes timezone.

    This preserves relative ordering for legacy naive timestamps across

View on GitHub (pinned to c896c09c42)

Solutions

  1. Use a supported schedule: '30m'/'2h'/'1d', 'every 2h', a 5-field cron expression, or an ISO timestamp.

When it happens

Trigger: Thrown at cron/jobs.py:703 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/40a45f5a70016950. Report an issue: GitHub.