-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
A legacy cron job shape in ~/.openclaw/cron/jobs.json (schedule as string + top-level command) can trigger scheduler errors (Cannot read properties of undefined (reading 'trim')) and may be partially hidden from normal openclaw cron list --json output.
This creates a failure mode where cron appears mostly healthy, but the scheduler keeps emitting tick failures and auto-disables the affected job.
Environment
- OpenClaw:
2026.2.15baseline in production audit - Host: macOS (Nimbus), but this appears store-shape/runtime parsing related (likely platform-agnostic)
Reproduction
- Ensure cron store contains a legacy entry like:
schedule: "0 */2 * * *"(string)command: "bash /path/to/script.sh"(top-level)
- Start/keep gateway running with cron enabled.
- Check logs and cron list:
tail -f ~/.openclaw/logs/openclaw.logopenclaw cron list --json
Expected
- Legacy entries are either migrated on load or rejected with a clear validation error.
- Scheduler does not emit recurring tick failures due to one malformed legacy entry.
- CLI listing and runtime store state are consistent.
Actual
- Repeated scheduler errors observed:
cron: timer tick failedTypeError: Cannot read properties of undefined (reading 'trim')cron: failed to compute next run for job (skipping)cron: auto-disabled job after repeated schedule errors
- Legacy job can be absent from
openclaw cron list --jsonwhile still present in store.
Evidence (from frozen audit bundle)
- Legacy store entry before migration:
{"id":"imessage-refresh","name":"iMessage Refresh","schedule":"0 */2 * * *","command":"bash /Users/Nimbus/clawd/scripts/imessage-refresh.sh","timeout":120,"enabled":false,"state":{"scheduleErrorCount":3,"lastError":"schedule error: TypeError: Cannot read properties of undefined (reading 'trim')"}}- Log signatures:
cron: timer tick failedTypeError: Cannot read properties of undefined (reading 'trim')cron: failed to compute next run for job (skipping)cron: auto-disabled job after repeated schedule errors
Impact
- Cron reliability degradation and noisy error loops.
- Hidden/misaligned operator view between store and CLI list.
- Increased operational risk during migrations/upgrades from older cron store formats.
Related (not duplicate as far as I can tell)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity