【问题标题】:Running a python script continuously, from system startup从系统启动开始连续运行 python 脚本
【发布时间】:2015-01-16 15:08:05
【问题描述】:

是否可以从系统启动开始连续运行 python 脚本,最好是在 windows 中(我可能还需要 linux 版本)。就是不断地ping我的远程服务器,检查更新并通知用户。

【问题讨论】:

    标签: python linux windows python-2.7


    【解决方案1】:

    听起来您想实现一项服务。 看看以下内容:Is it possible to run a python script as a service

    【讨论】:

    • 谢谢您,先生!但是在 linux 上呢?另外,如果您知道更简单的解决方案,请务必提及,因为提到的代码有点复杂。
    • 对于 linux,它可能取决于您的发行版。但是可以在这里找到一个小的:stackoverflow.com/questions/12973777/… 对于 Windows,也许更简单的方法是用户的启动文件夹。但这仅在您自动登录时才有效。或者您可以在脚本启动之前登录。
    猜你喜欢
    • 2020-07-16
    • 2015-12-05
    • 2022-01-17
    • 1970-01-01
    • 2016-12-19
    • 2022-10-02
    • 2018-06-17
    • 1970-01-01
    相关资源
    最近更新 更多