Time Trigger Using Function App

Introduction

In this article, I will explain about timer triggered functions with the Azure functions app as we define it. Before getting into the procedure, let’s have an overview of function apps. Azure Functions is a solution for running small lines of code or functions in the Cloud, and we can select the programming language as per our desire. We can build the code that we need at a small level, so that we need not to worry about the whole application for running it. Azure Functions applications let us develop Serverless applications.

Prerequisites

An active Azure subscription

Creating Azure Functions application

Step 1

Login to Azure portal.

Step 2

Click New->Compute->Function app.

Step 3

Now, we need to provide the details given below for Functions app.

 

  1. We need to provide a unique app name for Function app. 
  2. Create a resource group and provide a name for your resource group.
  3. The hosting part consists of Consumption Plan and App Service Plan.
      • The Consumption plan is the default plan but when we choose the consumption plan, we need to choose location.
      • In the concept of App Service plan, we need to create an app plan + location. It defines the location and features with cost, with the sources, with the app.

  4. The storage account has to be configured so that we can either choose the existing storage or we can create a new storage account.

Step 4

Click "Create" to deploy Functions app.

Step 5

Now, for creating a time triggered function, we need to create a function in a new function application.

Step 6

In the functions app, expand the function app and select + button in the functions. Select the scenario with the desired programming language. I have selected JavaScript. You can select the programming template of your own and click Custom Functions for viewing the complete set of function templates of it.

Step 7

Select  Timer triggered - JavaScript ( or your desired programming language template).

Step 8

The name of the function with name and schedule values will be set as default.

Click "Create" for creating the function so that we can change the schedule values later. The schedule suggestion value will be defined in the CRON expression for scheduling the function to run.
 

Step 9

Now, we can change or update the function time scheduling by expanding the function. Click "Integrate" and we can change the input and output of the schedule.

Step 10

Now, we can enter a new schedule value based on the CRON expression. Click "Save".

Finally, we have created a Time-Triggered Functions app that runs once every hour.

Thanks for reading.

Up Next
    Ebook Download
    View all
    TOP Azure
    Read by 1 people
    Download Now!
    Learn
    View all