【问题标题】:Python run script after closing vm without nohup file关闭没有nohup文件的vm后Python运行脚本
【发布时间】:2021-10-11 21:10:21
【问题描述】:

我试图在关闭我的虚拟机后永远运行我的 python 脚本

我正在使用:

nohup python3 myscript.py &

我的问题是,我创建了输出文件nohup,2 天后它使用了我所有 VM 的内存。 有没有办法在没有nohup 文件和我的内存问题的情况下永远运行我的脚本?

【问题讨论】:

    标签: python virtual-machine nohup


    【解决方案1】:

    你可以这样做。

    nohup python3 myscript.py > /dev/null &
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-18
      • 2021-08-15
      • 1970-01-01
      • 1970-01-01
      • 2017-07-07
      相关资源
      最近更新 更多