如果 SQL Server 作业已经在运行,它会跳过计划的运行吗?

发布于 2024-07-20 08:47:34 字数 100 浏览 6 评论 0原文

如果您安排 SQL Server 作业每 X 分钟运行一次,并且它在分钟数结束之前没有完成上一个调用,那么它会跳过该运行,因为它已经在运行,还是会运行该作业的两个实例工作执行相同的步骤?

If you schedule a SQL Server job to run every X number of minutes, and it does not finish the previous call before the # of minutes is up, will it skip the run since it is already running, or will it run two instances of the job doing the same steps?

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

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

发布评论

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

评论(3

烟柳画桥 2024-07-27 08:47:34

SQL Server 代理在开始新的迭代之前检查作业是否已在运行。 如果您有长时间运行的作业并且其计划出现,它将被跳过,直到下一个间隔。

你可以自己尝试一下。 如果您尝试启动已在运行的作业,您将收到一条错误消息。

The SQL Server agent checks whether the job is already running before starting a new iteration. If you have long running job and its schedule comes up, it would be skipped until the next interval.

You can try this for yourself. If you try to start a job that's already running, you will get an error to that effect.

三寸金莲 2024-07-27 08:47:34

我很确定如果它正在运行它会跳过它。

I'm pretty sure it will skip it if it is running.

如痴如狂 2024-07-27 08:47:34

您使用的是哪个版本的 SQL Server? 这似乎是一件很容易测试的事情。 设置一个包含 WAITFOR 的作业,将一行插入表中,并将该作业设置为快速连续运行两次(比 WAITFOR DELAY 短)。

在 SQL Server 2005 中运行此类测试时,它会跳过重叠的运行。

Which version of SQL Server are you using? This seems like a pretty easy thing to test. Set up a job with a WAITFOR in it that inserts a single row into a table and set up the job to run twice in quick succession (shorter than the WAITFOR DELAY).

When running such a test in SQL Server 2005 it skipped the run that was overlapped.

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