windows server 怎么设置守护进程 - V2EX
推荐学习书目
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

windows server 怎么设置守护进程

  •  
  •   littlepython Aug 15, 2019 5226 views
    This topic created in 2462 days ago, the information mentioned may be changed or developed.
    有几个 python 脚本在 windows server 下运行 ,有没有什么办法可以给它刷个守护
    14 replies    2019-08-15 16:36:00 +08:00
    soulzz
        1
    soulzz  
       Aug 15, 2019   1
    winsw
    wqawd520
        2
    wqawd520  
       Aug 15, 2019   1
    百度 windows 服务,就行了
    jay4497
        3
    jay4497  
       Aug 15, 2019   1
    作为 Windows 服务么,可以看看 NSSM。
    hihipp
        4
    hihipp  
       Aug 15, 2019   1
    目前最优解应该就是 3 楼说的 NSSM。
    lihongjie0209
        5
    lihongjie0209  
       Aug 15, 2019   1
    NSSM
    littlepython
        6
    littlepython  
    OP
       Aug 15, 2019
    刚刚试了一下 nssm 这个要交 python 脚本打包成 exe 文件吗 @hihipp
    littlepython
        7
    littlepython  
    OP
       Aug 15, 2019
    @soulzz 这个也需要打包成 exe ?
    arrow8899
        8
    arrow8899  
       Aug 15, 2019   1
    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
        9
    soulzz  
       Aug 15, 2019   1
    @littlepython 不需要 这个是通过别人打包好的应用注册为服务再调用你的指令
    littlepython
        10
    littlepython  
    OP
       Aug 15, 2019
    @soulzz 你说的这个方法成功了 有一点没试过 多个脚本是不是只用设置在一个 xml 里面写就可以
    soulzz
        11
    soulzz  
       Aug 15, 2019   1
    多个脚本建议放在不同文件夹下取不同名字避免混淆
    littlepython
        12
    littlepython  
    OP
       Aug 15, 2019
    @jay4497 nssm 设置成功了 yeah
    littlepython
        13
    littlepython  
    OP
       Aug 15, 2019
    @arrow8899 谢谢 这个里面的 nssm 里面设置成功 那个命令的出了些问题
    wuwukai007
        14
    wuwukai007  
       Aug 15, 2019
    alwaysup
    About     Help     Advertise     Blog     API     FAQ     Solana     3385 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 69ms UTC 13:01 PVG 21:01 LAX 06:01 JFK 09:01
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86