Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens when an Azure Timer function has an execution duration that's longer shorter than the trigger period?

If an Azure function executes for say 10 minutes, but has a period of 5 minutes, does the trigger still fire at the 5 minute mark?

like image 224
hexcode Avatar asked Oct 31 '25 06:10

hexcode


1 Answers

The easiest way to answer this question is to test it yourself.

I created a small function that did nothing more than wait for 90 seconds after executing.

The timer is set to run every minute and therefore, the test is to see if the function still executes every minute on the minute or if it delays by the 30 seconds.

Schedule

The logs show that the answer to your question is ... NO

You can see that it's queued another execution though because as soon as it's finished, it starts again.

You'll also see the start times of each invocation is delayed by the 30 seconds additional it takes for the function to run.

This is the function ...

using System;

public static async Task Run(TimerInfo myTimer, ILogger log)
{
    log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");

    await Task.Delay(90000);
}

Monitor Log

Logs

Invocations

Invocations

like image 101
Skin Avatar answered Nov 01 '25 20:11

Skin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!