andrew
andrew

Reputation: 389

Keep Python script running after screen lock (Win. 7)

I am running a Python script that uses the requests library to get data from a service.

The script takes a while to finish and I am currently running it locally on my Windows 7 laptop. If I lock my screen and leave, will the script continue to run (for ~3 hours) without Windows disconnecting from the internet or halting any processes? The power settings are already set up to keep the laptop from sleeping.

If it will eventually halt anything, how do I keep this from happening? Thanks.

Upvotes: 14

Views: 34865

Answers (2)

weirdev
weirdev

Reputation: 1398

Check "Power Options" in the Control panel. You don't need to worry about the screen locking or turning off as these wont affect running processes. However, if your system is set to sleep after a set amount of time you may need to change this to Never. Keep in mind there are separate settings depending on whether or not the system is plugged in.

Upvotes: 7

Jesse Webb
Jesse Webb

Reputation: 45263

As long as the computer doesn't get put to sleep, your process should continue to run.

Upvotes: 14

Related Questions