使用启动D(MAC)自动运行一次Python脚本

发布于 2025-02-04 06:50:17 字数 331 浏览 3 评论 0原文

我试图每3天自动运行python脚本

我要完成的工作是,该脚本是安排每3天的时间安排的,如果当时计算机离线,则应使用启动立即运行 ,然后在下一个计划的时间再次运行。如果我没记错的话?

您知道如何将此特定条件设置为启动脚本吗?

startInterval 似乎不是正确的解决方案。

<key>StartInterval</key>
<integer>600</integer>

先感谢您!

I am trying to automatically run a python script every 3 days.

What I am trying to accomplish is that the script is scheduled for every 3 days and if at that time the computer is offline, the job should be run immediately with startup and then again at the next scheduled time. Launchd does not seem to permit this, at least not directly, if I am not mistaken.

Do you know how to set this specific condition into a launchd script?

StartInterval seems not to be the correct solution.

<key>StartInterval</key>
<integer>600</integer>

Thank you in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文