As @thanzeel said, it seems to be the CRON Expression Name is missing in the Function App Configuration Menu - App Settings.
Schedule_GetData
must be added to configuration with its value
I have reproduced in my local and cloud environment; it is working good with below configuration with.NET 6 Function App:
Function Code:
using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
namespace PravuNet6TTFunApp
{
public class Function1
{
[FunctionName("Function1")]
public void Run([TimerTrigger("%Schedule_GetData%")]TimerInfo myTimer, ILogger log)
{
log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
}
}
}
local.settings.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"Schedule_GetData": "0 */1 * * * *"
}
}
Before Publishing to the Azure Portal Function App, Added the Same Local App Setting (Cron Expression) to the Configuration Menu > Application Settings of the Azure Portal Function App.
