为什么Google Cloud Scheduler不尊重dundeDeadline

发布于 2025-02-12 06:14:34 字数 462 浏览 4 评论 0 原文

我创建了一个HTTP Cloud Scheduler任务。我希望它的最长运行时间为5分钟。但是,我的任务是 deadline_exceeded 完全1分钟。

当我运行 gcloud调度程序作业时,请描述mysynctask 查看我的任务,它报告了 trimdeadline:300S 。我正在调用的服务是云运行,我还设置了300s限制。

我正在通过单击GUI中的“强制工作”来手动运行任务。

完全在日志中1分钟后,它报告了deadline_exceeded

“

I have created an http cloud scheduler task. I'm expecting it to have a maximum run time of 5 minutes. However my task is reporting DEADLINE_EXCEEDED after exactly 1 minute.

When I run gcloud scheduler jobs describe MySyncTask to view my task it reports attemptDeadline: 300s. The service I am calling is cloud run and I have also set a 300s limit.

I am running the task manually by clicking "force a job run" in the GUI.

After 1 minute exactly in the logs it reports DEADLINE_EXCEEDED

deadline after 1 minute

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

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

发布评论

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

评论(1

帥小哥 2025-02-19 06:14:36

当您执行作业默认 tribdeadline 值,根据此问题。

如果您想手动运行它,我建议您从并通过 - 代码> 带有所需值的标志,如此答案:

gcloud beta scheduler jobs update http <job> --attempt-deadline=1800s --project <project>

When you execute a job from the GUI, it will be executed using the default attemptDeadline value, which is 60 seconds according to this question.

If you want to run it manually, I suggest to run the job from the Cloud Shell and pass the --attempt-deadline flag with the desired value, as shown on this answer:

gcloud beta scheduler jobs update http <job> --attempt-deadline=1800s --project <project>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文