-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report: cron.add Tool Parameter Validation Failure
Date: 2026-02-02
Reporter: rmax (via RMax-10 agent)
Affected Tool: cron.add
OpenClaw Version: 2026.1.30
Severity: Medium
Summary
The cron.add tool rejects all job creation attempts with a validation error claiming missing required properties, even when all required fields are present and correctly formatted.
Error Message
invalid cron.add params: must have required property 'name'; must have required property 'schedule'; must have required property 'sessionTarget'; must have required property 'payload'
Reproduction Steps
1. Verify cron system is functional
cron action=status
# Returns: {"enabled": true, "jobs": 1, ...}
cron action=list
# Returns: Existing job(s) with correct structure2. Attempt to add a new job
Minimal example:
{
"name": "Test Job",
"schedule": {"kind": "every", "everyMs": 60000},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "test"}
}With job wrapper:
{
"job": {
"name": "Test Job",
"schedule": {"kind": "every", "everyMs": 60000},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "test"}
}
}With action field:
{
"action": "add",
"job": {
"name": "Test Job",
"schedule": {"kind": "every", "everyMs": 60000},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "test"}
}
}Cron expression format:
{
"name": "Cron Test",
"schedule": {"kind": "cron", "expr": "*/30 * * * *", "tz": "UTC"},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "Test"}
}With all optional fields:
{
"id": "test-job-1",
"name": "Test Job",
"schedule": {"kind": "every", "everyMs": 3600000},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "Test message"},
"enabled": true
}Result for all attempts: ❌ "missing required properties" error
Evidence of Valid Schema
Existing job in store (created previously, still functional):
{
"id": "cc8016cb-8e3c-4c47-ae64-832b36d79580",
"agentId": "main",
"name": "Status check job",
"enabled": false,
"schedule": {"kind": "every", "everyMs": 1800000},
"sessionTarget": "main",
"payload": {"kind": "systemEvent", "text": "..."}
}Expected Behavior
Tool should accept valid job object and return success with job ID.
Actual Behavior
Tool rejects all attempts with validation error.
Environment
- OpenClaw: 2026.1.30
- Node.js: v24.3.0
- OS: Linux 6.12.41+deb13-arm64 (arm64)
- Cron store: ~/.openclaw/cron/jobs.json
Additional Notes
cron.status,cron.list,cron.runsall work correctly- Only
cron.addappears affected - Cron system itself is functional (existing jobs execute)
Hypothesis
Parameter parsing bug where validation runs before the job object is properly extracted from the request.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working