Azure / Azure/azure-functions-host

Azure timer triggered function not invoked.

Open
#8,649 11 comments 1 reaction 1 assignee Assigned to @ramya894 View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

The Azure Timer Triggered function is not invoked, strangely, refreshing the corresponding Azure function app page in Azure Portal triggers this function.

#### Investigative information

- Timestamp: 2022-08-19 12:07:26.403
- Function App version: v4
- Function name(s) (as appropriate): AppExpiryNotifier
- Invocation ID: 34a19bfa-aec6-4faa-b90f-d91d7c6a6177
- Region: NorthEurope
- OS: Linux
- Plan: Consumption

#### Expected behavior

Azure function should be invoked as per the schedule. Code and configuration extracts are as below,

```
[Function(nameof(AppExpiryNotifier))]
public async Task Run([TimerTrigger("%NotificationSettings:TimerInterval%")] ScheduleInfo scheduleInfo)
{
_logger.LogInformation($"Timer trigger function executed at: {DateTime.Now}");

await _expiryNotificationService.ScanAndNotifyAsync();

_logger.LogInformation($"Next timer schedule at: {scheduleInfo?.ScheduleStatus?.Next}");
}
```
![image](https://user-images.githubusercontent.com/7764072/185880168-8e7b28b4-e75d-491a-9c86-45fc782a7c93.png)

#### Actual behavior

Timer function is not triggered.

#### Known workarounds

- Refreshing the function app page (browser refresh) in Azure portal will trigger the function.

#### Related information

- i have only one timer triggered function in the app - have commented the http triggered function as there were few blogs that attributed mix of timer and http triggers to be the root cause. But, this did not fix the issue.
- Have tried timer synchronization step as describe [here ](https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing)- this did not give permanent solution.
- Function app is deployed using Azure DevOps using `AzureFunctionApp@1` task.
- No additional configuration related to time zones.

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.