Skip to content

feat(jobs): add per-job retry with backoff via frontmatter #174

@TerrysPOV

Description

@TerrysPOV

Problem

A failed job silently skips to the next scheduled run with no retry attempt. Transient failures (network hiccup, quota spike, external service timeout) cause missed runs with no recovery.

Proposed solution

Add optional retry and retry_delay frontmatter fields to job files:

---
schedule: "*/50 * * * *"
retry: 3
retry_delay: 300
---
Your job prompt here

Track per-job failure state in state.json:

{"jobs": [{"name": "gmail-oauth-refresh", "nextAt": 123, "failCount": 1, "retryAt": 456}]}

The runner checks retryAt before nextAt and resets failCount to 0 on success. No retry config = existing behaviour unchanged.

Source

Requested by @Nibbler1250 in #14 (Mega-Post) with a concrete implementation proposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions