Skip to content

Config $include directive causes cron scheduler to stop executing jobs #10534

@echo931

Description

@echo931

Bug Description

When using $include directives to split the configuration into modular files, the cron scheduler stops executing jobs even though:

  • The gateway starts successfully
  • All agents load correctly
  • Jobs are correctly scheduled with valid nextRunAtMs timestamps
  • The .state file shows correct job state

Environment

  • OpenClaw version: 2026.2.3-1 (d84eb46)
  • OS: Debian 13 (trixie)
  • Node: v22.22.0

Steps to Reproduce

  1. Create a working monolithic openclaw.json with cron jobs
  2. Split the config into modular files using $include:
    {
      "gateway": { "$include": "gateway.json5" },
      "agents": [
        { "$include": "agents/defaults.json5" },
        { "$include": "agents/core.json5" }
      ],
      ...
    }
  3. Restart gateway
  4. Observe that cron jobs have correct nextRunAtMs but never execute

Expected Behavior

Cron jobs should execute at their scheduled times regardless of whether the config uses $include or is monolithic.

Actual Behavior

  • Jobs are scheduled (visible via cron list)
  • nextRunAtMs passes without execution
  • Job state shows "Last: Xh ago" and keeps incrementing
  • No error in logs related to cron execution
  • Gateway otherwise functions normally (agents respond to messages)

Workaround

Reverting to a monolithic config (no $include) restores cron execution immediately.

Additional Context

  • The plugin loader shows Cannot find module 'zod' but this seems unrelated (existed before the issue)
  • Jobs manually triggered via cron run work fine
  • The issue persisted across multiple gateway restarts with the modular config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions