Skip to content

fix(scheduler): restore cron job visibility via WS RPC - #76

Merged
kalinon merged 3 commits into
mainfrom
fix/scheduler-cron-list-ws-rpc
Mar 31, 2026
Merged

fix(scheduler): restore cron job visibility via WS RPC#76
kalinon merged 3 commits into
mainfrom
fix/scheduler-cron-list-ws-rpc

Conversation

@moltar-bot

Copy link
Copy Markdown
Contributor

Problem

Scheduler was not showing gateway cron jobs (only heartbeat jobs appeared).

Root cause

  • /tools/invoke did not expose cron/cron.list on this gateway integration (404 Tool not available)
  • jobs.json fallback was blocked by workspace path policy (PATH_NOT_ALLOWED on /cron/jobs.json)

Fix

  • add gatewayWsRpc('cron.list', { includeDisabled: true }) fallback in cronList() before jobs.json fallback
  • preserve existing fallback behavior and logging

Validation

  • npm run -w ./api test:run -- openclawGatewayClient.test.js
  • Local runtime verification after API rebuild:
    • GET /api/v1/openclaw/cron-jobs now returns gateway cron jobs + heartbeat jobs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores scheduler visibility of gateway cron jobs by adding a WebSocket RPC fallback to cronList() when /tools/invoke does not expose cron tooling and the jobs.json workspace fallback is blocked.

Changes:

  • Add a new gatewayWsRpc('cron.list', { includeDisabled: true }) fallback in cronList() before the jobs.json fallback.
  • Preserve existing behavior for /tools/invoke-based cron listing, including existing “service unavailable/not configured” graceful returns.
  • Extend logging around the new fallback path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/src/services/openclawGatewayClient.js Outdated
Comment thread api/src/services/openclawGatewayClient.js
@moltar-bot

Copy link
Copy Markdown
Contributor Author

Addressed Codex review blocker ✅

  • Updated cronList() fallback flow so WS RPC SERVICE_NOT_CONFIGURED / SERVICE_UNAVAILABLE no longer returns early.
  • It now continues to jobs.json fallback for max compatibility.
  • Updated logging/messages + docblock to reflect actual fallback order.
  • Updated unit expectation in openclawGatewayClient.test.js.

Validation:

  • npm run -w ./api test:run -- openclawGatewayClient.test.js (pass)

@kalinon
kalinon merged commit b6c46c3 into main Mar 31, 2026
9 checks passed
@kalinon
kalinon deleted the fix/scheduler-cron-list-ws-rpc branch March 31, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants