Timer trigger
To create a serverless function that executes on a specific schedule, we need to use the timer trigger. A timer trigger is an event, which triggers the function execution periodically, based on a specific schedule. To demonstrate a scheduled function, we will create a new function to run every minute and average our scoring results.
Note
There are certainly easier ways to average scoring results, however, we are using averaging to showcase a scheduled process.
Prior to creating the function, let us explain how to define the function's schedule.
CRON expression
In Azure Functions, a binding for a timer trigger will look like the following, where the schedule is defined by a CRON expression:
{
"name": "name of the trigger parameter in function signature",
"type": "timerTrigger",
"direction": "in",
"schedule": "CRON Expression"
}A CRON expression is a string, typically, used to define a schedule for a routine in job schedulers on Unix-like systems...