Skip to content

Feature Request: cron.defaults.delivery config for default delivery target #9155

Description

@gildo

Summary

Add a cron.defaults.delivery config option so users can set a default delivery channel/target for all cron jobs, avoiding repetitive per-job configuration.

Motivation

Currently, every isolated cron job with delivery.mode: "announce" requires explicit delivery.channel and delivery.to fields. Without them, the fallback is "last" which uses the main session's last reply target — often incorrect (see #3520).

For users with a primary notification channel (e.g., Telegram), this means duplicating the same delivery config across every job:

{
  "delivery": {
    "mode": "announce",
    "channel": "telegram",
    "to": "-1001234567890:topic:123"
  }
}

Proposed Solution

Add cron.defaults.delivery following the existing pattern from agents.defaults.heartbeat:

{
  "cron": {
    "enabled": true,
    "defaults": {
      "delivery": {
        "mode": "announce",
        "channel": "telegram",
        "to": "-1001234567890:topic:123"
      }
    }
  }
}

Resolution priority

  1. Job-level delivery (highest) — explicit per-job config
  2. cron.defaults.delivery — global default
  3. "last" fallback (lowest) — current behavior

Prior Art

The heartbeat system already supports this pattern:

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "target": "telegram",
        "to": "-1001234567890"
      }
    }
  }
}

Related Issues

Environment

  • OpenClaw version: 2026.2.4
  • Primary channel: Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestimpact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions