Creating a timer trigger

Perform the following steps:

  1. Click on the + icon, search for timer, and click on the Timer trigger button.
  2. In the New Function popup, provide the details. The Schedule here is a CRON expression that ensures that the timer trigger gets triggered automatically every 5 minutes:

  1. Paste the following code in the code editor and save the changes. The following code simulates traffic by making HTTP requests programmatically. Be sure to replace <<FunctionAppName>> with the actual name of your function app:
using System;
public async static void Run(TimerInfo myTimer, ILogger log)
{
using (var httpClient = new HttpClient())
{
var response = await httpClient.GetAsync("https://<FunctionAppName>>.azurewebsites.net/api/HttpALive");
}
}