Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions create_scheduled_task.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@echo off
echo Creating Windows Task Scheduler task for Stable Diffusion Server...

:: Create the task to run at system startup
schtasks /create /tn "StableDiffusionServer" ^
/tr "D:\code\stable-diffusion-server\start_server.bat" ^
/sc onstart ^
/ru SYSTEM ^
/rl highest ^
/f

:: Alternative: Run as current user at logon
:: schtasks /create /tn "StableDiffusionServer" ^
:: /tr "D:\code\stable-diffusion-server\start_server.bat" ^
:: /sc onlogon ^
:: /rl highest ^
:: /f

echo Task created successfully!
echo.
echo To manage the task:
echo Start: schtasks /run /tn "StableDiffusionServer"
echo Stop: schtasks /end /tn "StableDiffusionServer"
echo Delete: schtasks /delete /tn "StableDiffusionServer" /f
echo Query: schtasks /query /tn "StableDiffusionServer"
echo.
pause
Loading
Loading