Automated background execution of a Python script upon system initialization, without invoking a terminal interface on windows

I have developed a Python script employing the pyautogui module, which automatically refreshes the system every hour.

I require a mechanism to execute this script in the background upon system startup, without invoking a terminal interface. Is this feasible?

Please respond if anyone has any insight on this matter.

1 Like

Look into Windows scheduled services and startup tasks.

5 Likes

From the name I assume you built a GUI python script.

It is best to have a console script not a GUI script if your goal is to run it without a display.

Then you can turn your console script into a Windows Service.
A long long time ago I used pywin32 · PyPI to make a python script that was a Windows Service. You could check pywin32 docs and see if that is still a supported feature.

2 Likes