OpenClaw Windows Fix — Scheduled Task Idle-Kill Bug Patch

Fixes the Windows scheduled task bug that kills OpenClaw processes during idle. One script, permanent fix.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "OpenClaw Windows Fix — Scheduled Task Idle-Kill Bug Patch" with this command: npx skills add theshadowrose/openclaw-windows-fix


The Problem

When OpenClaw runs as a Windows Scheduled Task, the default settings include an idle condition that kills the process after a period of inactivity. This means your agent goes offline randomly.

The Fix

This script creates a corrected scheduled task that:

  • Runs at user logon
  • Does NOT stop on idle
  • Restarts on failure (1 minute delay)
  • Runs whether on battery or AC power

Usage

Option 1: Run the fix script (recommended)

Right-click FIX_TASK.batRun as Administrator

Option 2: Manual fix

  1. Open Task Scheduler (search for it in Start)
  2. Find your OpenClaw task
  3. Right-click → Properties
  4. Go to Conditions tab
  5. UNCHECK "Start the task only if the computer is idle"
  6. UNCHECK "Stop if the computer ceases to be idle"
  7. Go to Settings tab
  8. UNCHECK "Stop the task if it runs longer than"
  9. Set "If the task fails, restart every" to 1 minute
  10. Click OK

FIX_TASK.bat Contents

@echo off
echo Fixing OpenClaw Scheduled Task...
echo.

REM Delete the old task
schtasks /delete /tn "OpenClaw Gateway" /f 2>nul

REM Create corrected task (runs at logon, no idle kill)
schtasks /create /tn "OpenClaw Gateway" /tr "cmd /c cd /d \"%USERPROFILE%\.openclaw\" && gateway.cmd" /sc ONLOGON /rl HIGHEST /f

echo.
echo Done! The task will now survive idle periods.
echo Restart your computer or run the task manually to apply.
pause

How to Verify

After running the fix:

  1. Open Task Scheduler
  2. Find "OpenClaw Gateway"
  3. Check Conditions tab — no idle conditions should be checked
  4. Leave your computer idle for 30+ minutes
  5. Check if OpenClaw is still running

⚠️ Disclaimer

This software is provided "AS IS", without warranty of any kind, express or implied.

USE AT YOUR OWN RISK.

  • The author(s) are NOT liable for any damages, losses, or consequences arising from the use or misuse of this software — including but not limited to financial loss, data loss, security breaches, business interruption, or any indirect/consequential damages.
  • This software does NOT constitute financial, legal, trading, or professional advice.
  • Users are solely responsible for evaluating whether this software is suitable for their use case, environment, and risk tolerance.
  • No guarantee is made regarding accuracy, reliability, completeness, or fitness for any particular purpose.
  • The author(s) are not responsible for how third parties use, modify, or distribute this software after purchase.

By downloading, installing, or using this software, you acknowledge that you have read this disclaimer and agree to use the software entirely at your own risk.

DATA DISCLAIMER: This software processes and stores data locally on your system. The author(s) are not responsible for data loss, corruption, or unauthorized access resulting from software bugs, system failures, or user error. Always maintain independent backups of important data. This software does not transmit data externally unless explicitly configured by the user.


Support & Links

Built with OpenClaw — thank you for making this possible.


🛠️ Need something custom? Custom OpenClaw agents & skills starting at $500. If you can describe it, I can build it. → Hire me on Fiverr

Installation Note

The FIX_TASK.bat script is included in the README instructions. Create a file named FIX_TASK.bat in your workspace and paste the script content from README.md. ClawHub does not distribute .bat files directly.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

PM2 Gateway Restart

Use PM2 to reliably restart OpenClaw gateway on Windows. Use when the user wants to restart the OpenClaw gateway, fix port conflicts, or recover from a crash...

Registry SourceRecently Updated
1330Profile unavailable
General

OpenClaw Gateway Manager

Unified multi-cloud management tool for detecting, configuring, restarting, verifying, creating, and safely deleting all OpenClaw gateway instances on macOS.

Registry SourceRecently Updated
1670Profile unavailable
General

小红书MCP补丁包

自动检测并修复小红书MCP部署常见问题,包括端口占用、cookie路径、服务状态及超时等待。

Registry SourceRecently Updated
4890Profile unavailable
General

OpenClaw 插件安装常见问题排查

解决OpenClaw插件安装中常见npm包名错误、权限问题和安装验证的排查方法及最佳实践。

Registry SourceRecently Updated
8570Profile unavailable