What's actually happening
IB Gateway and TWS are flaky processes to leave running unattended. They hang — stuck at a login dialog, stuck mid-restart during IBC's own daily AutoRestartTime, or taken down entirely by a Windows Update forcing a reboot — and when they do, there's no error dialog, no crash, nothing in Windows' own process list to flag it. Your trading system just goes quietly offline until something else happens to notice.
This isn't a hypothetical. It's the exact recovery playbook that's resolved this same failure, by hand, repeatedly, on a live multi-account trading system — now automated instead of requiring someone to notice and fix it manually.
What it looks like when it fires
Gateway Watchdog runs on a timer next to your Gateway/TWS instance(s) and does exactly one job: when one goes dark, it fixes it — clears stale scheduler state, kills the stuck process (only when it can identify it with zero ambiguity), relaunches it, and confirms it actually came back.
How it works
- On a timer you control (Windows Task Scheduler, 15 minutes by default), it checks whether each Gateway/TWS instance's API port is still accepting connections.
- If a port drops, it clears any stale state on that instance's relaunch task.
- It looks for the stuck process — but only kills it if exactly one process unambiguously matches your configuration. Zero matches or more than one are logged and skipped, never guessed at.
- It triggers the Scheduled Task you already have set up to start that instance.
- It waits, then re-checks the port and logs whether recovery actually worked.
Quick start — free tier
No signup, no account linking, no IBKR connection at all. It's a few minutes of PowerShell.
It checks whether your Gateway/TWS instance's API port is still accepting connections — nothing is sent anywhere else, and no IBKR credentials or API access are needed at all. Register it as a Windows Scheduled Task (the exact command is in the README) and it'll start logging the moment your instance goes dark.
Free vs Pro
The free tier is genuinely open source (MIT licensed) — not a disabled trial. Its code has no process-kill or relaunch capability in it at all, by design, and it refuses to start if your config lists more than one instance.
| Free | Pro | |
|---|---|---|
| Detect a hung or crashed Gateway | ✓ | ✓ |
| Watch more than one instance at once | — | ✓ |
| Automatically kill and relaunch | — | ✓ |
| Verify recovery, retry if still down | — | ✓ |
Common questions
- Does this use IBKR's trading API at all?
- No. It only checks whether a local network port is accepting connections and manages a Windows process and Scheduled Task — the same kind of check as any process-health monitor. No IBKR credentials, no API access, no trading data touched.
- Does this launch Gateway/TWS for me from scratch?
- No — it triggers a Windows Scheduled Task you already have set up to start your instance. If you don't have one yet, set that up first; this tool calls it, it doesn't replace it.
- What happens if it can't tell which process is stuck?
- It skips the kill step and logs a warning rather than guessing. Killing the wrong process is the one thing this tool is built to never risk.
- Is this a subscription?
- No. Pro is a one-time purchase, $129, with a 7-day refund window. No recurring fee.
- Does this catch a scheduled task that fails to launch in the first place?
- No — that's a different failure than this tool watches for. Gateway Watchdog checks whether the Gateway/TWS app itself is still accepting connections once it's up. It has no visibility into whether a separate process (like your own trading engine) successfully launched tonight. Here's a real incident where that exact gap bit us.