Azure Functions 计时器触发器横向扩展

Azure Functions Timer Trigger Scale-out

如果我有一个 Azure 函数,它 运行 每 5 分钟触发一次计时器,如果一个 运行 花费超过 5 分钟会发生什么?

下一个计时器触发器是否会启动,而不管当前是否有任何正在执行的触发器?

我问的原因:我需要确保一次只有 1 个 Azure Function 运行ning(是的,我知道这违背了函数的概念)。如果一个 运行 花费 < 5 分钟(大部分时间它应该),很好 - 在接下来的 5 分钟 window 开始下一个。如果没有完成,请不要开始。

我更愿意使用 Azure Functions,但在这种情况下 - 我是否应该不打扰而直接使用连续 运行ning Azure WebJob?

谢谢!

如 TimerTrigger 中所述wiki page:

If your function execution takes longer than the timer interval, another execution won't be triggered until after the current invocation completes. The next execution is scheduled after the current execution completes.

因此,您应该已经获得了您正在寻找的行为 - 在任何给定时间只有一个函数调用 运行。