NSSM:从python脚本创建服务

2024-10-04 05:26:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要从python脚本创建一个服务,为此我使用NSSM(非吸吮服务管理器)。我可以使用以下命令安装服务: nssm安装 但是,当我尝试启动服务时,它会处于暂停状态。在

nssm start <Service_Name>

当我试图从服务.msc它会出现Windows无法启动服务的错误。在

我使用的python脚本如下:

^{pr2}$

请告诉我如何使python脚本作为服务。在


Tags: name命令脚本管理器windows错误servicestart
1条回答
网友
1楼 · 发布于 2024-10-04 05:26:26

我对nssm不是很有经验,但在他们的网站上,他们写道:

2017-04-26: Users of Windows 10 Creators Update should use prelease build 2.2.4-101 to avoid an issue with services failing to start. If for some reason you cannot use that build you can also set AppNoConsole=1 in the registry, noting that applications which expect a console window may behave unexpectedly.

我想试试版本的东西,也许就是这个

相关问题 更多 >