@echo off echo === SETUP AUTOMATIC ORPHAN CLEANUP === echo. echo This will create a scheduled task that runs every 4 hours echo to clean up orphaned Claude processes. echo. :: Create the scheduled task schtasks /create /tn "Claude Orphan Cleanup" /tr "python \"%~dp0tools\story-runner\dashboard\cleanup_orphans.py\" --kill" /sc hourly /mo 4 /f if %errorlevel% == 0 ( echo. echo [OK] Scheduled task created successfully! echo Runs every 4 hours automatically. echo. echo To remove: schtasks /delete /tn "Claude Orphan Cleanup" /f ) else ( echo. echo [ERROR] Failed to create scheduled task. echo Try running as Administrator. ) pause