推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
littlepython
V2EX  ›  Python

windows server 怎么设置守护进程

  •  
  •   littlepython · Aug 15, 2019 · 5703 views
    This topic created in 2640 days ago, the information mentioned may be changed or developed.
    有几个 python 脚本在 windows server 下运行 ,有没有什么办法可以给它刷个守护
    14 replies  •  2019-08-15 16:36:00 +08:00
    soulzz
    soulzz
    Aug 15, 2019❤️1
    1
    winsw
    wqawd520
    wqawd520
    Aug 15, 2019❤️1
    2
    百度 windows 服务,就行了
    jay4497
    jay4497
    Aug 15, 2019❤️1
    3
    作为 Windows 服务么,可以看看 NSSM。
    hihipp
    hihipp
    Aug 15, 2019❤️1
    4
    目前最优解应该就是 3 楼说的 NSSM。
    lihongjie0209
    lihongjie0209
    Aug 15, 2019❤️1
    5
    NSSM
    littlepython
    littlepython
    OP
    Aug 15, 2019
    6
    刚刚试了一下 nssm 这个要交 python 脚本打包成 exe 文件吗 @hihipp
    littlepython
    littlepython
    OP
    Aug 15, 2019
    7
    @soulzz 这个也需要打包成 exe ?
    arrow8899
    arrow8899
    Aug 15, 2019❤️1
    8
    https://stackoverflow.com/questions/32404/how-do-you-run-a-python-script-as-a-service-in-windows
    这上面有几种方法,你试下
    sc create PythonApp binPath= "C:\Python34\Python.exe --C:\tmp\pythonscript.py"
    soulzz
    soulzz
    Aug 15, 2019❤️1
    9
    @littlepython 不需要 这个是通过别人打包好的应用注册为服务再调用你的指令
    littlepython
    littlepython
    OP
    Aug 15, 2019
    10
    @soulzz 你说的这个方法成功了 有一点没试过 多个脚本是不是只用设置在一个 xml 里面写就可以
    soulzz
    soulzz
    Aug 15, 2019❤️1
    11
    多个脚本建议放在不同文件夹下取不同名字避免混淆
    littlepython
    littlepython
    OP
    Aug 15, 2019
    12
    @jay4497 nssm 设置成功了 yeah
    littlepython
    littlepython
    OP
    Aug 15, 2019
    13
    @arrow8899 谢谢 这个里面的 nssm 里面设置成功 那个命令的出了些问题
    wuwukai007
    wuwukai007
    Aug 15, 2019
    14
    alwaysup
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   897 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 20:51 · PVG 04:51 · LAX 12:51 · JFK 15:51
    ♥ Do have faith in what you're doing.