openclaw - 💡(How to fix) Fix [Windows] scheduled task watchdog: repetition Duration=P1D expires after 1 day, loses auto-restart

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…

Root Cause

P1D repetition duration is relative to the task's StartBoundary, not a rolling window. After 1 day, the repetition is exhausted.

Fix Action

Fix / Workaround

Workaround we deployed

RAW_BUFFERClick to expand / collapse

Problem

onboard --install-daemon on Windows registers a scheduled task (OpenClaw Gateway) with a LogonTrigger whose repetition Duration is set to P1D (1 day). Since the task's StartBoundary is the installation date, the repetition expires after 24 hours. After that:

  • The task still fires once at user logon (the LogonTrigger itself)
  • But the 3-minute repeat interval stops
  • If the gateway crashes on day 2+, there is no automatic restart

Reproduction

  1. Run openclaw onboard --install-daemon on Windows
  2. Gateway crashes 2+ days later
  3. It stays dead — the scheduled task's NextRunTime is empty

Root cause

P1D repetition duration is relative to the task's StartBoundary, not a rolling window. After 1 day, the repetition is exhausted.

Suggested fix

Change the repetition Duration to an effectively infinite value like P9999D (~27 years) so the watchdog survives the lifetime of the installation.

Alternatively, use a separate watchdog task with a -Once trigger + repetition (what we ended up deploying manually) because:

  • LogonTrigger repetition doesn't kick in if the user is already logged in when the task is modified
  • A dedicated watchdog task is cleaner to manage

Workaround we deployed

A standalone OpenClaw Watchdog task that:

  • Runs a check script via wscript.exe (no console flash)
  • Checks every 3 minutes if port 18789 is listening
  • If not, starts gateway.cmd
  • Uses IgnoreNew to skip when gateway is already running

Environment

  • OpenClaw 2026.5.7 (eeef486)
  • Windows 11 Pro 10.0.26200

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…

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 [Windows] scheduled task watchdog: repetition Duration=P1D expires after 1 day, loses auto-restart