This is my Function.Json
{ "generatedBy": "Microsoft.NET.Sdk.Functions-1.0.28", "configurationSource": "attributes", "bindings": [
{
"type": "timerTrigger",
"schedule": "*/5 * * * * *",
"useMonitor": true,
"runOnStartup": false,
"name": "myTimer"
} ], "disabled": false, "scriptFile": "../bin/PullRequest.dll", "entryPoint": "PullRequest.PullRequest.Run" }
This is my actual function:
[FunctionName("PullRequest")]
public static void Run([TimerTrigger("*/5 * * * * *")]TimerInfo myTimer, ILogger log)
{
if (myTimer.IsPastDue)
{
log.LogInformation("Timer is running late!");
}
log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
}
When I tried to run this function on Azure portal then it only run once and stops.
Time trigger will automatically execute as per CORN expression i.e. in your case this function will execute every five seconds and If you run it from azure portal it will run only once.
If you want to check timings of last executions you can go to Monitor tab and check timings .
I have executed this locally and its working as expected