如果 SQL Server 作业已经在运行,它是否会跳过计划的运行? [英] Will a SQL Server Job skip a scheduled run if it is already running?

查看:44
本文介绍了如果 SQL Server 作业已经在运行,它是否会跳过计划的运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您安排一个 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?

推荐答案

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.

这篇关于如果 SQL Server 作业已经在运行,它是否会跳过计划的运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆