python - 让 python 脚本在 google VM 上运行

标签 python google-cloud-platform

我使用 google 设置了一个虚拟机,并希望它能够持续运行 python 脚本。如果我退出 SSH session ,脚本就会停止。有没有一种简单的方法可以在我注销后继续执行此操作?

最佳答案

由于您可以打开 SSH session ,因此您可以安装任意数量的终端多路复用器,例如 tmux、screen 或 byobu。

如果您无法在虚拟机上安装东西,通过 cron 作业每分钟调用一次脚本也可以解决问题。

关于python - 让 python 脚本在 google VM 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32885938/

相关文章:

python - 添加 jedi-vim 时出错

python - 导入行 : E501 line too long 中的 PEP8 错误

google-cloud-platform - 谷歌云运行需要负载均衡吗?

python - 获取错误类型错误 : create_task() takes from 1 to 2 positional arguments but 3 were given while creating google cloud tasks

python - VIM自动补全废话

Python内存模型

python - 在 Python 2.7 Windows 7 上安装 Audiere 模块

Golang 和 gcloud API : how to get an auth token

google-cloud-platform - 计算引擎 SSH : You do not have sufficient permissions to SSH into this instance

google-cloud-platform - 删除 Google Cloud Registry 上未标记的图像