Skip to content

TypeError: Cannot read properties of undefined (reading 'padEnd') in cron table formatter #57872

@cloudebott-blip

Description

@cloudebott-blip

Bug Description

Cron table formatting crashes when displaying jobs with undefined values in the schedule or state fields.

Error Details

Location:
Error:
Frequency: Repeats approximately every 60 seconds

Steps to Reproduce

  1. Create a cron job with missing or undefined fields in the schedule or state
  2. Run 'openclaw cron list' or let the cron table formatter run
  3. Observe the TypeError in logs

Expected Behavior

The formatter should gracefully handle undefined/null values by showing empty strings or "N/A" rather than crashing.

Actual Behavior

Environment

  • OpenClaw Version: 2026.3.28
  • Node Version: v25.8.0
  • OS: Linux (WSL2)

Suggested Fix

Add null/undefined checks before calling on values in the cron table formatter. Something like:

Impact

This error appears frequently in logs and may interfere with cron job monitoring and debugging. It doesn't seem to affect actual job execution, but it clutters logs and makes troubleshooting harder.

Additional Context

Error observed when running with multiple cron jobs, some of which have missing state fields or undefined schedule values. The error appears to originate from the table formatting code that displays job status in the CLI.


Happy to provide more details or test a fix if needed!

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