Sql Server Agent作业运行时间超过执行间隔

时间:2021-08-05 13:04:51

I would like to know what happens if an agent job (with recurring interval) in MS SQL server runs long enough so that it overlaps recurring execution.

我想知道如果MS SQL服务器中的代理作业(具有重复间隔)运行的时间足够长,以便重复执行,会发生什么。

According to my tests, paralleled execution does not happen, whit is good.

根据我的测试,并行执行不会发生,whit是好的。

What I'm trying t find out is that will the next execution be ignored because the previous one is not finished yet, OR will it be queued?

我要弄清楚的是,下一个执行会被忽略,因为前一个还没有完成,或者它会排队吗?

By "queued" I mean executing the queued requests immediately after the previous completed discarding the schedule.

“排队”是指在上一次完成丢弃计划后立即执行排队的请求。

Thank you

1 个解决方案

#1


6  

It will not be queued, it will be skipped. Easy to test: Create a job with a WAITFOR DELAY '00:05:00';, schedule job for < 2 minutes from now, then start the job manually. It will run for 5 minutes, once.

它不会排队,它会被跳过。易于测试:使用WAITFOR DELAY '00:05:00'创建作业;从现在起安排作业<2分钟,然后手动启动作业。它将运行5分钟,一次。

#1


6  

It will not be queued, it will be skipped. Easy to test: Create a job with a WAITFOR DELAY '00:05:00';, schedule job for < 2 minutes from now, then start the job manually. It will run for 5 minutes, once.

它不会排队,它会被跳过。易于测试:使用WAITFOR DELAY '00:05:00'创建作业;从现在起安排作业<2分钟,然后手动启动作业。它将运行5分钟,一次。