# window-service-deployment **Repository Path**: minXAM/window-service-deployment ## Basic Information - **Project Name**: window-service-deployment - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-02-28 - **Last Updated**: 2024-03-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### windows部署python [学习配置连接地址](https://zhuanlan.zhihu.com/p/534570980) ```python # 需要安装的库pip install supervisor-win、pip install pywin32 # supervisord.conf配置 [program:cancel] # python启动的环境和需要运行的脚本 command=G:\\Anaconda3\\envs\\tdx_easytrader\\python.exe D://CODE//tdx_easytrader//dataserver.py autorestart=true # 无论退出原因,总是重启 [supervisord] nodaemon=true [supervisorctl] # 运行命令 supervisord -c D:\CODE\tdx_easytrader\supervisord.conf # 日志配置 [supervisord] logfile = ./tmp/supervisord.log logfile_maxbytes = 50MB logfile_backups=10 loglevel = info pidfile = ./tmp/supervisord.pid # web界面管理配置 [inet_http_server] # inet (TCP) server disabled by default port=*:9001 # ip_address:port specifier, *:port for all iface username=xx # default is no username (open server) password=xxx # default is no password (open server) ``` [supervisor 安装配置及使用](https://www.cnblogs.com/arnoldlivip/p/12789560.html) ```python [include] files = /etc/supervisor/conf.d/*.conf # 包含配置多个文件 [program:test] # test是运行程序名称 command= # 运行命令 directory=/tmp/ # 运行文件目录 autostart=true # 自动启动 startsecs=2 # 启动10秒后没有异常退出,就表示进程正常启动了,默认为1秒 startretries=3 # 启动失败自动重试次数,默认是3 stopsignal=TERM # 请求停止时用于终止程序的信号。可以是TERM,HUP,INT,QUIT,KILL,USR1或USR2中的任何一个 ```