How to stop a "schedule" loop in Python that keeps running after hitting Ctrl+C?

Viewed 32

Using python on Visual Studio Code. I have a scheduled function:

schedule.every().minute.at(":10").do(foo)

while True:
         schedule.run_pending()

The problem is after I hit CTRL+C, the Script appears to stop but a few seconds later that scheduled function keeps executing.

What am I supposed to do to actually stop the loop?

0 Answers
Related