问题
I have written a python program that periodically runs with ApScheduler package. The .pyw file runs in the background, but when I restart the PC the program doesn't continue running.
What can I do to run a code automatically in startup a windows 10 pc?
回答1:
You should consider putting your python file to the Startup folder.
Click Win+R at the same time on your keyboard
Type shell:startup
Drag and drop your python file onto the folder that opened.
Note: I reccomend to put a shortcut of your python file for easier editing.
来源:https://stackoverflow.com/questions/51622702/windows-10-run-python-program-in-startup