Skip to content

Python is being put into an idle state by Windows and stops responding #145048

@mikealvarrez

Description

@mikealvarrez

Bug report

Bug description:

If I write any Python code and run it with a click, opening the Windows console, it works for the first few minutes. Five or fifteen minutes later, Windows puts my program into idle mode and it stops running.

Even if I instantiate a second thread with Flask listening for requests from a second program that is activated every five minutes by the Windows Task Scheduler.

My program simply goes into idle mode. Totally bizarre.

while True:
    print(dt.datetime.now())
    time.sleep(60)

CPython versions tested on:

3.11

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowspendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions