Hello, @Yasir Khan - Thanks for reaching out!
Was this a one-off behavior that was observed only on that day? Or are you still continuing to see this behavior where the trigger invocations are off & runs are inconsistent against the logs? Determining whether it was a transient vs an ongoing/permanent issue is an important piece of detail that can be used to (a) explain the behavior & (b) establish mitigation steps if needed. Based on the information you provided, I would verify the following:
- Were the 9 runs possibly "catch-up" runs on missed executions during the downtime? TimeTriggers don't have Retry behavior but it does try to maintain the schedule throughout restarts/crashes by leveraging the history of past execution, please see: Scheduling
- You can try leveraging the decorators such as
run_on_startup
,use_monitor
and theIsPastDue
property to distinguish if the 9 runs were indeed missed invocations that can be ignored. The doc states the following: "TheisPastDue
property is true when the current function invocation is later than scheduled. For example, a function app restart might cause an invocation to be missed."
- You can try leveraging the decorators such as
- Regarding the missing logs, is it possible that sampling is enabled in App Insights?
- Please see: Be aware of sampling
- Is the
WEBSITE_TIME_ZONE
setting absent? - If you're using the
NCRONTAB
(instead ofTimeSpan
) for defining the schedule, which it sounds like you are, it's important to set theWEBSITE_TIME_ZONE
app setting provided that you're on Linux Premium/Dedicated plans. The hotfix that you deployed at 9pm has likely caused a restart of the Function App and if theWEBSITE_TIME_ZONE
setting was not present at the time, TimeTrigger defaults to using the UTC timezone which could have thrown off the timer calculations. Note that this setting isn't supported on the Consumption plan. - Lastly, what was the reason the TimeTrigger failed in the first place? Did the ensuing deployment of the fix succeed without any errors/issues?
I hope this answer gives a starting point. If you're still blocked with the same issue and this answer doesn't help much, let me know in the comments below and we'd be happy to dig deeper for troubleshooting the root cause.