openclaw - 💡(How to fix) Fix [Bug] Windows Gateway startup detection false positive causes 5min delay [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#61579Fetched 2026-04-08 02:57:06
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

On Windows, when Gateway starts via Scheduled Task, the logs repeatedly show this warning:

gateway already running under schtasks; waiting 5000ms before retrying startup

This warning appears ~18 times consecutively, causing ~5 minute startup delay.

Root Cause

On Windows, when Gateway starts via Scheduled Task, the logs repeatedly show this warning:

gateway already running under schtasks; waiting 5000ms before retrying startup

This warning appears ~18 times consecutively, causing ~5 minute startup delay.

RAW_BUFFERClick to expand / collapse

Description

On Windows, when Gateway starts via Scheduled Task, the logs repeatedly show this warning:

gateway already running under schtasks; waiting 5000ms before retrying startup

This warning appears ~18 times consecutively, causing ~5 minute startup delay.

Reproduction

  1. Configure Gateway auto-start on Windows (via openclaw gateway start)
  2. Restart computer or manually trigger the scheduled task
  3. Check logs - Gateway keeps retrying

Timeline (2026-04-05)

  • 20:18:26 - Gateway starts, loads plugins/cron
  • 20:18:40 - First warning appears
  • 20:18:45 - Feishu bot ready
  • 20:18:53 - QQBot ready
  • 20:19:00 ~ 20:23:12 - 18 consecutive warnings, every 5 seconds
  • ~5 minutes later - finally enters normal state

Actual situation

  • Only 1 Gateway instance running (via scheduled task)
  • No duplicate startup entries
  • Gateway eventually works, but with severe startup delay

Environment

  • OS: Windows
  • Gateway managed by Scheduled Task
  • Port: 18789

Expected behavior

  • Startup detection should correctly identify scheduled task startup
  • Or exit directly when already running instead of infinite retry

Related

Maybe related to #41591 or #48766

extent analysis

TL;DR

The Gateway startup delay on Windows via Scheduled Task can be mitigated by adjusting the startup detection mechanism to correctly identify when the Gateway is already running.

Guidance

  • Review the startup detection logic to ensure it accurately identifies the Gateway instance running under the Scheduled Task, potentially by checking for a specific process name or ID.
  • Consider implementing a more robust mechanism for handling duplicate startup attempts, such as exiting immediately when a running instance is detected.
  • Investigate the relationship between this issue and the potentially related issues #41591 and #48766 to determine if a similar solution or fix can be applied.
  • Verify that the Scheduled Task configuration is correct and that there are no duplicate or conflicting startup entries.

Example

No specific code example can be provided without more information about the Gateway's startup detection mechanism.

Notes

The exact cause of the issue is unclear, but it appears to be related to the startup detection logic. Adjusting this logic or implementing a more robust handling mechanism for duplicate startup attempts may resolve the issue.

Recommendation

Apply a workaround by adjusting the startup detection mechanism to correctly identify when the Gateway is already running, as this is likely to be a more immediate solution than waiting for a potential fix in a future version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Startup detection should correctly identify scheduled task startup
  • Or exit directly when already running instead of infinite retry

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Windows Gateway startup detection false positive causes 5min delay [1 participants]