Skip to content

[Bug]: Cron task configuration error causes Gateway crash #52563

Description

@wuhaiyuan-byte

Bug type

Crash (process/app exits or hangs)

Summary

Cron task configuration error causes the entire Gateway process to crash instead of just failing the task

Steps to reproduce

  1. Create a cron task with invalid parameter (e.g., incorrect --at format)
  2. When the task executes, the Gateway process crashes
  3. Check gateway logs - error 'Invalid --at' appears, then Gateway disconnects

Expected behavior

Task configuration error should be caught and logged as task execution failure, not crash the entire Gateway process

Actual behavior

Gateway process crashes with error 'Invalid --at; use ISO time or duration like 20m', then disconnects all clients. Windows Scheduled Task auto-restarts Gateway after ~20 minutes

OpenClaw version

2026.3.13

Operating system

Windows 11

Install method

npm global

Model

minimax-cn/MiniMax-M2.5

Provider / routing chain

minimax-cn (direct)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Error: Invalid --at; use ISO time or duration like 20m
gateway connect failed: Error: gateway closed (1000)

Log shows:
- 23:54:32 - Cron task error 'Invalid --at'
- 23:54:41 - WebSocket handshake timeout
- 23:54:46 - Gateway restarts (auto-recovery via Windows Scheduled Task)

Impact and severity

Affected: All users relying on Gateway for messaging
Severity: High (causes complete service outage)
Frequency: Every time a cron task has invalid configuration
Consequence: Gateway crashes and disconnects all clients until auto-restart

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:crashProcess/app exits unexpectedly or hangs

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions