Windows 10在启动时运行python程序

ind*_*ble 4 python windows startup python-3.x apscheduler

我编写了一个 python 程序,它定期与 ApScheduler 包一起运行。.pyw 文件在后台运行,但当我重新启动电脑时,程序不会继续运行。

如何在 Windows 10 电脑启动时自动运行代码?

Rem*_*ida 6

您应该考虑将 python 文件放入 Startup 文件夹中。

在键盘上同时单击Win+R
键入shell:startup
将 python 文件拖放到打开的文件夹中。

注意:我建议放置python 文件的快捷方式以便于编辑。