Skip to content

[Bug] cron add CLI validation failed: job must be object #56996

@relunctance

Description

@relunctance

Bug Description

openclaw cron add CLI command fails with validation error.

Environment

  • openclaw: linux/amd64
  • node: v22.22.1
  • npm global: ~/.npm-global

Steps to Reproduce

openclaw cron add --name test --every 300 --message ping

Expected

Cron job should be created successfully.

Actual

Validation failed for tool "cron": - job: must be object

Root Cause

CLI sends flat arguments:

{ "action": "add", "name": "test", "every": 300, "message": "ping" }

But cron tool schema expects a job wrapper:

{ "action": "add", "job": { "name": "test", "schedule": {...}, "payload": {...} }}

Impact

  • All cron jobs fail to create via CLI
  • TangSeng workflow automation cannot be set up
  • Every 5-minute task polling is broken

Suggested Fix

CLI should wrap the job payload in a job field before calling the cron tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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