Timer triggered Azure Function executes irregularly

Viewed 68

I have a timer triggered Azure Function whitch executes every morning at 04:30 AM

public static void Run([TimerTrigger("0 30 4 * * *")] TimerInfo myTimer)

Now I noticed that the invocation log shows me quite different execution times:

public static void Run([TimerTrigger("0 30 4 * * *")] TimerInfo myTimer)

This function worked like a charm. Since one week I notice the below issues:

How can this be that there are executions 2 minutes before the defined time? And why there are executions up to 8 minutes (!!) after the defined time?

Another strange behaviour is that in a different environment I see that the exact same Azure Function is triggered multiple times within the same minute:

enter image description here

Could this be an issue with the display in the invocation log or does somebody know more about this strange effect?

Any hint is highly appreciated!

1 Answers

How can this be that there are executions 2 minutes before the defined time?

An error of about two minutes may be normal, which may be related to the design.

And why there are executions up to 8 minutes (!!) after the defined time?

Processing time depends on the code you write and the size of the data processed.

Another strange behaviour is that in a different environment I see that the exact same Azure Function is triggered multiple times within the same minute

Please check if runOnStartup is set to True. I think this is caused by multiple instances running at the same time. You can refer to this official documentation.

enter image description here

Related