Skip to content

cron: CLI delivery flags silently ignored for script jobs #22

@Arry8

Description

@Arry8

Summary

When using openclaw cron add --script ... --channel <ch> --to <dest> --account <id> --best-effort-deliver, the delivery-related flags are silently dropped. The script payload builder sets deliver: true but the surrounding code never attaches the delivery object ({ mode, channel, to, accountId, bestEffort }) to the job create params.

Problem

The delivery infrastructure is job-level (not payload-level). For agentTurn jobs, the CLI correctly builds and attaches the delivery object. For script jobs, this wiring was missed in PR #17. Users who add --announce --channel telegram --to 12345 to a script job get no error but no delivery config is persisted.

Acceptance Criteria

  • --channel, --to, --account, --best-effort-deliver flags are correctly wired to the delivery object when --script is used
  • Error if --announce is used with --script but delivery pipeline isn't wired yet (until cron: delivery (announce to channel) for script payload jobs #21 lands)
  • Unit test: script job created with delivery flags has correct delivery object in the RPC payload

Files Affected

  • src/cli/cron-cli/register.cron-add.ts (~line 213-260, delivery wiring section)

Related

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