-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Closed
Description
Environment
- OpenClaw version: 2026.2.1
- OS: macOS (Darwin 25.2.0 arm64)
- Node: v22.22.0
Description
When creating cron jobs via the cron agent tool, the job is created but state.nextRunAtMs is not set, resulting in nextWakeAtMs: null in cron status. Jobs never auto-fire at the scheduled time.
Steps to Reproduce
- Use the
crontool to add a job:
{
"action": "add",
"job": {
"name": "Test",
"schedule": {"kind": "at", "atMs": 1770272283000},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {"kind": "agentTurn", "message": "Test", "deliver": true, "channel": "telegram", "to": "123456"}
}
}- Check
cron status→nextWakeAtMs: null - Job never fires automatically
- Manual
cron run <jobId> --forceworks
Expected Behavior
state.nextRunAtMs should be set when job is created, and job should auto-fire at scheduled time.
Workaround
Using CLI works correctly:
openclaw cron add --name "Test" --at "2m" --session isolated --message "Test" --deliver --wake nowCLI creates jobs with proper state: { nextRunAtMs: <timestamp> } while the tool creates jobs with empty state: {}.
Additional Context
Discovered while setting up wake-up call alarms. The difference between tool and CLI behavior suggests the tool endpoint is missing the state initialization logic that the CLI has.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels