当前位置:   article > 正文

Python脚本后台运行_python 后台运行

python 后台运行

1. Linux 后台运行命令(nohup

nohup python3 run.py >> run.log 2>&1 &

ps -ef | grep python3
产看所有python3进程

2. Windows 后台运行命令(pythonw)

pythonw .\run.py > run.log
后台使用Python运行run.py文件,日志输出到当前目录run.log文件

tasklist
查看windows下所有进程

taskkill /f /im 进程号
指定进程号或名称杀死进程

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/836168?site
推荐阅读
相关标签
  

闽ICP备14008679号