Linux がバックグラウンドの Python タスクを実行して閉じる

目次

1. python は Linux のバックグラウンドでタスクを実行します

2. Python バックグラウンド タスクを表示する

3.バックグラウンドで実行中のタスクを閉じる


1. python は Linux のバックグラウンドでタスクを実行します

nohup python -u test.py > out.log 2>&1 &   ###test.py为要运行的程序 out.log是程序产生的日记

2. Python バックグラウンド タスクを表示する

ps -ef | grep  python

3.バックグラウンドで実行中のタスクを閉じる

kill -9 7079

 

おすすめ

転載: blog.csdn.net/weixin_46504244/article/details/121032071