Skip to content

Commit a85fc0c

Browse files
committed
acrolinx and redirect old events topic
1 parent f37aeeb commit a85fc0c

File tree

2 files changed

+6
-74
lines changed

2 files changed

+6
-74
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,7 @@
11
---
2-
title: Create an event processing function | Microsoft Docs
3-
description: Use Azure Functions create a C# function that runs based on an event timer.
4-
services: functions
5-
documentationcenter: na
6-
author: ggailey777
7-
manager: erikre
8-
editor: ''
9-
tags: ''
102

113
ms.assetid: 84bd0373-65e2-4022-bcca-2b9cd9e696f5
12-
ms.service: functions
13-
ms.devlang: multiple
14-
ms.topic: get-started-article
15-
ms.tgt_pltfrm: multiple
16-
ms.workload: na
17-
ms.date: 09/25/2016
18-
ms.author: glenga
19-
4+
redirect_url: /azure/azure-functions/functions-create-scheduled-function
5+
ROBOTS: NOINDEX, NOFOLLOW
206
---
21-
# Create an event processing Azure Function
22-
Azure Functions is an event-driven, compute-on-demand experience that enables you to create scheduled or triggered units of code implemented in a variety of programming languages. To learn more about Azure Functions, see the [Azure Functions Overview](functions-overview.md).
23-
24-
This topic shows you how to create a new function in C# that executes based on an event timer to add messages to a storage queue.
25-
26-
## Prerequisites
27-
A function app hosts the execution of your functions in Azure. If you don't already have an Azure account, check out the [Try Functions](https://functions.azure.com/try) experience or [create a free Azure acccount](https://azure.microsoft.com/free/).
28-
29-
## Create a timer-triggered function from the template
30-
A function app hosts the execution of your functions in Azure. Before you can create a function, you need to have an active Azure account. If you don't already have an Azure account, [free accounts are available](https://azure.microsoft.com/free/).
31-
32-
1. Go to the [Azure Functions portal](https://functions.azure.com/signin) and sign-in with your Azure account.
33-
2. If you have an existing function app to use, select it from **Your function apps** then click **Open**. To create a new function app, type a unique **Name** for your new function app or accept the generated one, select your preferred **Region**, then click **Create + get started**.
34-
3. In your function app, click **+ New Function** > **TimerTrigger - C#** > **Create**. This creates a function with a default name that is run on the default schedule of once every minute.
35-
36-
![Create a new timer-triggered function](./media/functions-create-an-event-processing-function/functions-create-new-timer-trigger.png)
37-
4. In your new function, click the **Integrate** tab > **New Output** > **Azure Storage Queue** > **Select**.
38-
39-
![Create a new timer-triggered function](./media/functions-create-an-event-processing-function/functions-create-storage-queue-output-binding.png)
40-
5. In **Azure Storage Queue output**, select an existing **Storage account connection**, or create a new one, then click **Save**.
41-
42-
![Create a new timer-triggered function](./media/functions-create-an-event-processing-function/functions-create-storage-queue-output-binding-2.png)
43-
6. Back in the **Develop** tab, replace the existing C# script in the **Code** window with the following code:
44-
```cs
45-
using System;
46-
47-
public static void Run(TimerInfo myTimer, out string outputQueueItem, TraceWriter log)
48-
{
49-
// Add a new scheduled message to the queue.
50-
outputQueueItem = $"Ping message added to the queue at: {DateTime.Now}.";
51-
52-
// Also write the message to the logs.
53-
log.Info(outputQueueItem);
54-
}
55-
```
56-
57-
This code adds a new message to the queue with the current date and time when the function is executed.
58-
7. Click **Save** and watch the **Logs** windows for the next function execution.
59-
8. (Optional) Navigate to the storage account and verify that messages are being added to the queue.
60-
9. Go back to the **Integrate** tab and change the schedule field to `0 0 * * * *`. The function now runs once every hour.
61-
62-
This is a very simplified example of both a timer trigger and a storage queue output binding. For more information, see both the [Azure Functions timer trigger](functions-bindings-timer.md) and the [Azure Functions triggers and bindings for Azure Storage](functions-bindings-storage.md) topics.
63-
64-
## Next steps
65-
See these topics for more information about Azure Functions.
66-
67-
* [Azure Functions developer reference](functions-reference.md)
68-
Programmer reference for coding functions and defining triggers and bindings.
69-
* [Testing Azure Functions](functions-test-a-function.md)
70-
Describes various tools and techniques for testing your functions.
71-
* [How to scale Azure Functions](functions-scale.md)
72-
Discusses service plans available with Azure Functions, including the Consumption hosting plan, and how to choose the right plan.
73-
74-
[!INCLUDE [Getting Started Note](../../includes/functions-get-help.md)]
757

articles/azure-functions/functions-create-scheduled-function.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Learn how to use Azure Functions to create a function that runs based a schedule
2424

2525
![Create function app in the Azure portal](./media/functions-create-first-azure-function/function-app-in-portal-editor.png)
2626

27-
This topic uses as its starting point the resources created in one of these topic:
27+
This topic uses as its starting point the resources created in one of these topics:
2828

29-
+ [Create your first function from the Azure Portal](functions-create-first-azure-function.md)
29+
+ [Create your first function from the Azure portal](functions-create-first-azure-function.md)
3030
+ [Create function - CLI](functions-create-first-azure-function-azure-cli.md)
3131
+ Create function - Visual Studio
3232

33-
In this topic you will add a new timer triggered function to the function app you created in one of these topics.
33+
In this topic you create a timer triggered function in the function app from the previous topic.
3434

3535
It should take you less than five minutes to complete all the steps in this topic.
3636

@@ -48,7 +48,7 @@ It should take you less than five minutes to complete all the steps in this topi
4848

4949
![Functions quickstart in the Azure portal.](./media/functions-create-scheduled-function/functions-create-timer-trigger.png)
5050

51-
This creates a function in your chosen language that runs every minute. You can verify execution by viewing trace information written the logs.
51+
A function is created in your chosen language that runs every minute. You can verify execution by viewing trace information written the logs.
5252

5353
![Functions log viewer in the Azure portal.](./media/functions-create-scheduled-function/functions-timer-trigger-view-logs.png)
5454

0 commit comments

Comments
 (0)