Python脚本后台执行

在Linux中,可以使用nohup将脚本放置后台运行,如下:

nohup python myscript.py params1 > nohup.out 2>&1 & 
  • 使用-u参数,使得python不启用缓冲。
nohup python -u myscript.py params1 > nohup.out 2>&1 &
原文地址:https://www.cnblogs.com/gjack/p/10136202.html