Skip to content

Cron job fails with TypeError: Cannot read properties of undefined (reading 'trim') #43163

@smallmj

Description

@smallmj

Description

Cron jobs with payload.kind: systemEvent fail with error:

TypeError: Cannot read properties of undefined (reading 'trim')

Environment

  • OpenClaw version: 2026.3.8
  • Platform: Linux

Steps to Reproduce

  1. Create a cron job with payload.kind: systemEvent
  2. Wait for the cron job to trigger
  3. Job fails with the error above

Expected Behavior

Cron jobs with systemEvent payload should execute normally

Actual Behavior

All cron jobs using systemEvent fail with:

TypeError: Cannot read properties of undefined (reading 'trim')

Affected Jobs

  • 日历同步 (Calendar sync)
  • 邮件检查 (Email check)
  • Daily Auto-Update

Workaround

Using payload.kind: message instead of systemEvent may work, but requires specific session configuration.

Additional Info

The error appears to be in the cron-cli module when processing systemEvent payload. The error likely occurs in one of the .trim() calls in cron-cli code.

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