Skip to content

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

@gildo

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

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions