1. 程式人生 > >運行python腳本後臺執行

運行python腳本後臺執行

tails .py 時間 hup 什麽 執行 ref python腳本 tps

最近搞到了一臺服務器,掛一個腳本刷刷河畔在線時間。腳本隨便寫了兩下,能跑到什麽時候就隨緣了
https://blog.csdn.net/philosophyatmath/article/details/80174687

運行python腳本後臺執行

1 腳本後加&

python3  run.py >/dev/null 2>&1 &

2 使用nohup在後臺執行命令

nohup python3  run.py >/dev/null 2>&1 &

3 使用screen執行命令

4 使用watch連續地執行一個命令

運行python腳本後臺執行