|
1 | 1 | ---
|
2 | 2 | title: Enable features on a schedule
|
3 | 3 | titleSuffix: Azure App Configuration
|
4 |
| -description: Learn how to enable feature flags on a schedule. |
| 4 | +description: Learn how to enable feature flags on a schedule using time window filters in Azure App Configuration. |
5 | 5 | ms.service: azure-app-configuration
|
6 | 6 | ms.devlang: csharp
|
7 | 7 | author: zhiyuanliang-ms
|
8 | 8 | ms.author: zhiyuanliang
|
9 | 9 | ms.topic: how-to
|
10 |
| -ms.date: 03/26/2024 |
| 10 | +ms.date: 10/31/2024 |
| 11 | +#customer intent: As an application developer, I want to enable a recurring time window filter in a feature flag so that I can enable or disable features on a schedule. |
11 | 12 | ---
|
12 | 13 |
|
13 |
| -# Tutorial: Enable features on a schedule |
| 14 | +# Enable features on a schedule |
14 | 15 |
|
15 | 16 | [Feature filters](./howto-feature-filters.md#what-is-a-feature-filter) allow a feature flag to be enabled or disabled conditionally. The time window filter is one of the feature management library's built-in feature filters. It allows you to turn on or off a feature on a schedule. For example, when you have a new product announcement, you can use it to unveil a feature automatically at a planned time. You can also use it to discontinue a promotional discount as scheduled after the marketing campaign ends.
|
16 | 17 |
|
17 |
| -In this article, you will learn how to add and configure a time window filter for your feature flags. |
| 18 | +In this article, you learn how to add and configure a time window filter for your feature flags. |
18 | 19 |
|
19 | 20 | ## Add a time window filter
|
20 | 21 |
|
21 |
| -1. Create a feature flag named *Beta* in your App Configuration store and open to edit it. For more information about how to add and edit a feature flag, see [Manage feature flags](./manage-feature-flags.md). |
| 22 | +1. Create a feature flag named *Beta* in the **Feature Manager** menu of your App Configuration store and move to the right end of the feature flag you want to modify, then select the **More actions** ellipsis (**...**) action and **Edit**. For more information about how to add and edit a feature flag, see [Manage feature flags](./manage-feature-flags.md). |
22 | 23 |
|
23 |
| -1. In the **Edit feature flag** pane that opens, check the **Enable feature flag** checkbox if it isn't already enabled. Then check the **Use feature filter** checkbox and select **Create**. |
| 24 | +1. In the **Edit** pane that opens, check the **Enable feature flag** checkbox if it's currently unchecked,then check the **Use feature filter** checkbox and select **Create**. |
24 | 25 |
|
25 |
| - > [!div class="mx-imgBorder"] |
26 |
| - >  |
| 26 | + :::image type="content" source="media/time-window-filters/edit-a-feature-flag.png" alt-text="Screenshot of the Azure portal showing how to edit a feature flag."::: |
27 | 27 |
|
28 |
| -1. The pane **Create a new filter** opens. Under **Filter type**, select the **Time window filter** in the dropdown. |
| 28 | +1. The **Create a new filter** pane opens on the side. Under **Filter type**, select **Time window filter** in the dropdown. |
29 | 29 |
|
30 |
| - > [!div class="mx-imgBorder"] |
31 |
| - >  |
| 30 | + :::image type="content" source="media/time-window-filters/add-timewindow-filter.png" alt-text="Screenshot of the Azure portal showing time window feature filter configuration."::: |
| 31 | + |
| 32 | +1. A time window filter includes a start time and/or an end time. Both **Start time** and **End time** checkboxes are checked by default. |
| 33 | + - Setting a start time allows you to enable the feature flag on a specific date and time. A time window filter with no start time is active as soon as you save the feature filter details. |
| 34 | + - Setting an end time allows you to disable the feature flag at a specific date and time. A time window filter with no end time remains active until you disable it. |
| 35 | + |
| 36 | + Uncheck the end time and enter a start time a few minutes ahead of your current time to schedule the *Beta* feature to be enabled automatically in a few minutes and never be disabled once enabled. |
| 37 | + |
| 38 | +1. A time zone is selected by default, based on your browser's current time zone. Optionally select another time zone. |
| 39 | + |
| 40 | +## Enable recurrence |
| 41 | + |
| 42 | +Setting a time window recurrence allows you to define a repeating time window, ensuring that the feature flag is automatically activated and deactivated according to your specified schedule, such as during periods of low or high traffic. |
| 43 | + |
| 44 | +1. A recurring time window filter always has a start time and an end time, defining a base time window that recurs according to the recurrence pattern you specified. Enter a **Start time** and an **End time**, then select the **Enable recurrence** checkbox, and select the recurrence details, including a frequency and an expiration time. |
| 45 | + |
| 46 | + In this example, we activate the *Beta* feature **Daily** from November 25, every night between 8:00 PM and 6:00 AM. You can alternatively select a weekly frequency and select one or more days of the week for the recurrence. We set an **expiration time** a few weeks later. |
| 47 | + |
| 48 | + :::image type="content" source="media/time-window-filters/add-timewindow-filter-recurrence.png" alt-text="Screenshot of the Azure portal showing feature filter recurrence."::: |
32 | 49 |
|
33 |
| -1. A time window filter includes two parameters: start and expiry date. Set the **Start date** to **Custom** and select a time a few minutes ahead of your current time. Set the **Expiry date** to **Never**. In this example, you schedule the *Beta* feature to be enabled automatically at a future time, and it will never be disabled once enabled. |
34 | 50 |
|
35 | 51 | 1. Select **Add** to save the configuration of the time window filter and return to the **Edit feature flag** screen.
|
36 | 52 |
|
37 |
| -1. The time window filter is now listed in the feature flag details. Select **Apply** to save the feature flag. |
| 53 | +1. The time window filter is now listed in the feature filter details, under **Feature filters**. Select **Apply** to save the feature flag with the new feature filter. |
38 | 54 |
|
39 | 55 | > [!div class="mx-imgBorder"]
|
40 |
| - >  |
| 56 | + >  |
41 | 57 |
|
42 |
| - Now, you successfully added a time window filter to a feature flag. |
| 58 | + Now, you successfully added a time window filter to a feature flag. |
43 | 59 |
|
44 | 60 | 1. Continue to the following instructions to use the feature flag with a time window filter in your application for the language or platform you are using.
|
45 | 61 |
|
|
0 commit comments