OpenClaw Windows Fix Scheduled Task Idle-Kill Bug Patch
by @theshadowrose
Fixes the Windows scheduled task bug that kills OpenClaw processes during idle. One script, permanent fix.
clawhub install openclaw-windows-fixπ About This Skill
name: "OpenClaw Windows Fix β Scheduled Task Idle-Kill Bug Patch" description: "Fixes the Windows scheduled task bug that kills OpenClaw processes during idle. One script, permanent fix." author: "@TheShadowRose" version: "1.0.0" tags: ["openclaw", "windows", "bug-fix", "scheduled-task", "idle-kill", "patch"] license: "MIT"
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:
Usage
Option 1: Run the fix script (recommended)
Right-click FIX_TASK.bat β Run 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.
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
| | | |---|---| | π Bug Reports | TheShadowyRose@proton.me | | β Ko-fi | ko-fi.com/theshadowrose | | π Gumroad | shadowyrose.gumroad.com | | π¦ Twitter | @TheShadowyRose | | π GitHub | github.com/TheShadowRose | | π§ PromptBase | promptbase.com/profile/shadowrose |
*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.
π‘ Examples
Option 1: Run the fix script (recommended)
Right-click FIX_TASK.bat β Run 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