docs: add Windows auto-start guide via Task Scheduler (#113)

* docs: add Windows auto-start guide via Task Scheduler

* docs: fix markdown escaping, remove admin requirement, use path placeholder, link from README
This commit is contained in:
Johar Ali Shaik
2026-08-17 15:10:59 -07:00
committed by GitHub
parent c2ac8eeef3
commit 07be21e54a
2 changed files with 55 additions and 0 deletions
+4
View File
@@ -85,6 +85,10 @@ make serve # http://127.0.0.1:8765
python3 service/scripts/server.py --host 127.0.0.1 --port 8765
```
### Windows (no Docker)
See [docs/windows-autostart.md](docs/windows-autostart.md) for auto-starting the service at Windows login without Docker.
For the whole infra (core + optional harness/heavy backends), see [Docker / compose](#docker--compose) below.
Optional system tools (auto-used when present — preinstalled in the core Docker image):
+51
View File
@@ -0,0 +1,51 @@
# Windows: Auto-start the service at login
Run the service silently in the background on every login, without a terminal window or manual start.
## 1. Clone the repo somewhere permanent
Replace `<path-to-clone>` below with wherever you want the repo to live (e.g. `C:\watermarks-remover` or `C:\Users\<you>\watermarks-remover`). Use the same path consistently in every step below.
```powershell
git clone https://github.com/guillaumemeyer/watermarks-remover.git <path-to-clone>
```
## 2. Create a silent launcher script
Save as `<path-to-clone>\start-service.vbs`:
```vbscript
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "python service\scripts\server.py --host 127.0.0.1 --port 8765", 0, False
```
## 3. Register a scheduled task
This does **not** require Administrator privileges — `-AtLogOn` with a user-level trigger runs under your own account, so a regular PowerShell window is enough.
```powershell
$action = New-ScheduledTaskAction -Execute "wscript.exe" -Argument '"<path-to-clone>\start-service.vbs"' -WorkingDirectory "<path-to-clone>"
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
Register-ScheduledTask -TaskName "WatermarksRemoverService" -Action $action -Trigger $trigger -Settings $settings -Description "Auto-starts the watermarks-remover HTTP service at login"
```
## 4. Start it immediately (no reboot needed)
```powershell
Start-ScheduledTask -TaskName "WatermarksRemoverService"
```
## 5. Verify
```powershell
Invoke-RestMethod http://127.0.0.1:8765/health
```
Should return `{"ok": true, "version": "..."}`.
## Notes
- Requires Python 3.10+ on PATH.
- The scheduled task runs at every login going forward — no manual start needed.
- To stop auto-starting: `Unregister-ScheduledTask -TaskName "WatermarksRemoverService"`