Windows 10 run python program in startup

若如初见. 提交于 2020-06-26 04:05:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!