Azure Timer Functions 还记得他们错过预定时间的时间吗?

Azure Timer Functions remember when they missed a scheduled time?

如果我有一个 Azure“计时器”功能,运行“每精确一分钟”"0 */1 * * * *" .. 但如果我的代码需要 - 超过 - 分钟,那么 'next run' 确实触发了……但等待当前 运行 完成,然后尽快 运行s。

它好像记得它错过了一个 运行,当当前 运行 完成时,它会尽快检查 'missed runs' 和 运行。

这是可配置的设置还是 'by design'?

证明:

    public static class Function1
    {
        [FunctionName("Function1")]
        public static async Task Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, ILogger log, CancellationToken cancellationToken)
        {
            log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");

            await Task.Delay(TimeSpan.FromSeconds(100), cancellationToken);
        }
    }

@Pure.Krome,这是设计使然,如果函数执行时间比指定的计时器间隔长,则下一次调用在第一次调用完成后执行。这是由于 TimerTrigger 在后端使用的单例机制造成的。您可以通过 documented here.

形式查看附加信息