转换为exe后,将python脚本作为Windows服务运行

时间:2017-01-17 14:51:54

标签: python windows python-2.7 windows-services

我有一个python脚本,它提出了一个用于通信目的的套接字,我已经设法使用Pyinstaller将其转换为exe并通过双击成功运行它。

我尝试使用以下guide使exe服务成为Windows服务但是当我通过services.msc运行服务时,我得到了:
Windows could not start the test1 service on Local Computer Error 1053: the service did not respond to the start or control request in a timely fashion

我想知道每个 python脚本是否真的可以成为一个Windows服务,或者它有一些标准,因为我在上面的guide中没有看到这个。

我试着把它变得更简单,并创建了以下代码的python脚本:
while True: z = 10 print z 现在我创建了一个exe文件和一个服务,当我尝试运行它时,我得到了:

Windows could not start the test1 service on Local Computer
Error 1067: the process terminated unexpectedly

有人可以指导我,我做错了什么?

0 个答案:

没有答案