【问题标题】:Running a Python script in the background在后台运行 Python 脚本
【发布时间】:2017-08-17 11:06:46
【问题描述】:

嘿,我正在运行一个使用 selenium 的 python 脚本。

当我运行 python3.5 quickstart.py 时,它是一种享受。当我使用 nohup python3.5 quickstart.py 它不起作用并且 nohup.out 没有任何内容,当然当我关闭我的 shell 时 python3.5 quickstart.py 结束。

【问题讨论】:

  • 非常好。那么你的问题是什么?
  • 不起作用 没有任何意义。你应该说出究竟发生了什么:错误信息、计算机崩溃、火灾等。

标签: python linux shell ubuntu terminal


【解决方案1】:

你应该在 nohup 命令之后添加&

nohup python program.py &

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-09
    • 2017-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-22
    • 2012-05-03
    相关资源
    最近更新 更多