Time Triggered Azure Functions on Azure Portal

Posted by

Time-triggered Azure Functions are a type of Azure Functions that are triggered by a timer, rather than by an event or a REST API call. They run on a schedule specified by a CRON expression and can be used for tasks such as running batch jobs, cleaning up old data, and generating reports. These functions are created using the Azure Functions runtime and can be written in a variety of programming languages, including C#, JavaScript, and Python.

Here is a step-by-step tutorial on creating a time-triggered Azure function:

  1. Go to the Azure portal and create a new Azure Functions app by clicking on “Create a resource” and then selecting “Function App”.
  2. Fill in the required details like subscription, resource group, name, storage account, and runtime stack. Once done, click on the “Create” button.
  3. Once the function app is created, go to the Functions app and click on “New Function”.
  4. Select “Timer trigger” and then click on the “Create this function” button.
  5. Provide a name for the function, select a language (e.g. C#, Java, JavaScript, etc.), and leave the other options to default. Then, click on the “Create” button.
  6. A default function code will be generated, and you can modify the code to perform the desired actions.
  7. Next, go to the function’s “Integrate” tab and configure the trigger to run at a specific time by setting the CRON expression in the “Timer” field.
  8. Save the changes and then press the “Run” button in the top left corner to test the function.
  9. The function should now run at the specified time, and you can view its logs by clicking on the “Monitor” tab.

That’s it! You now have a time-triggered Azure function that runs on a schedule as specified in the CRON expression.

Learn to create HTTP-triggered Azure functions here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.