• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

Scheduled flag changes

Read time: 5 minutes
Last edited: May 20, 2022
Scheduled flag changes is an Enterprise feature

Scheduled flag changes is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Overview

This topic explains how to schedule flag changes to take effect at a date in the future.

Scheduling flag changes allows you to define and schedule changes to your flag’s targeting rules for future points in time. Scheduled changes allow you to to create a progressive delivery strategy by scheduling the incremental steps to release your feature to 100% of your user base.

For example, you can schedule a feature to turn on for internal testing two days from today, then enable it for your ‘beta’ customer segment four days later, and finally start an automated rollout increasing to 100% over the following five days.

You can configure scheduled flag change permissions with custom roles

You can create a custom role policy to allow or deny it to make scheduled flag changes.

To learn more about custom roles actions for this feature, read Using actions.

You can also use the REST API: Scheduled changes

Benefits of scheduling flag changes

Benefits of scheduling flag changes include:

  1. Timing an early launch: Scheduling your flag to turn on or off on a specified date/time allows you to plan your release without having to manually make changes at desired release times.
  2. Progressive feature rollouts: This functionality allows you to create a set of scheduled changes to your flag once, and LaunchDarkly slowly release the feature for you. For example, you can schedule your flag to roll out to 20% of your user base tomorrow, 35% the day after, 50% the day after that, and increase that percentage until it reaches 100%.
  3. Temporary user access: You can schedule rules that target certain users and segments to be added to or removed from your flag’s targeting to better manage user access.
  4. Flag hygiene: You can schedule your flag’s targeting rules to clean up once your flag has been rolled out to 100% of your users.
Feature Workflows are available in the LaunchDarkly API

All of LaunchDarkly's features are supported by API endpoints. To learn more about the API and supported endpoints for Feature Workflows, read the API documentation.

Creating scheduled flag changes

To schedule a set of flag changes:

  1. Navigate to the flag dashboard and select the flag for which you want to schedule targeting changes. The flag's Targeting tab appears.
  2. Make the changes you want to the flag’s targeting.
  3. Click the dropdown icon in the Review and save button and select "Schedule changes":
The "Schedule changes" option below the "Save Changes" button.
The "Schedule changes" option below the "Save Changes" button.
  1. In the "Schedule" section, click on Select a date to expand a calendar view:
The change scheduling calendar.
The change scheduling calendar.
  1. Set a date and time for when you want the changes to execute.
  2. Click Apply.
  3. Review and confirm the changes displayed in the dialog. If you need to make changes, click Edit next to the pencil icon.
  4. If your environment requires approvals for flag changes, enter a description and choose one or more reviewers.
  5. Enter a comment and the environment name.
  6. Click Schedule changes. Your changes have now been scheduled.

You can schedule multiple changes for a single flag for different dates and times.

For example, you can implement a progressive rollout strategy by scheduling multiple sequential changes to targeting rules.

Here is an image of a flag with multiple changes scheduled:

A flag with multiple changes scheduled.
A flag with multiple changes scheduled.

If you use scheduled flag changes to schedule user removal dates, but an approver approves the request after the scheduled date and time of the user removal, LaunchDarkly prevents you from applying the change. To learn more about scheduling, read Scheduling user removal from segments.

Creating scheduled flag changes that require approvals

Enterprise customers can require approvals for scheduled flag changes. If approvals are required, the change is marked "Pending Review" in the pending change drawer.

If there are conflicts between changed flags and requested changes, approved and applied changes take precedence over pending or requested changes. To learn more, read Managing conflicts with scheduled changes.

Viewing scheduled flag changes

To view all the scheduled changes for a flag:

  1. Navigate to the flag dashboard and select the flag for which you want to view the scheduled changes. The flag's Targeting tab appears.
  2. The number of scheduled changes appear in the upper right corner:
The number of pending changes for a flag.
The number of pending changes for a flag.
  1. To view the complete list of changes, click on the clock icon. A drawer appears that displays all the pending changes that are scheduled for this flag. The changes are listed chronologically, with the earliest upcoming change listed first:
The pending number of changes for a flag.
The pending number of changes for a flag.

Updating scheduled flag changes

To update a scheduled flag change:

  1. Follow the steps in Viewing scheduled flag changes to open the list of pending scheduled changes for the flag.
  2. Find the scheduled change you wish to update.
  3. Click on the overflow menu in the upper right and choose "Edit":
The Edit option on a pending change.
The Edit option on a pending change.
  1. A dialog appears with the list of scheduled flag changes.
  2. You can change the schedule by changing the date or time for these changes. If you need to make other changes, click Edit next to the pencil icon.
  3. Enter a comment and the environment name.
  4. Click Update schedule change to save your updates to the scheduled change.

Deleting scheduled flag changes

To delete a scheduled flag change:

  1. Follow the steps in Viewing scheduled flag changes to open the list of pending scheduled changes for the flag.
  2. For the scheduled change you wish to delete, click on the overflow menu in the upper right and choose "Delete":
The "Edit" and "Delete" options for a scheduled workflow.
The "Edit" and "Delete" options for a scheduled workflow.

Managing conflicts with scheduled changes

It’s possible that as you schedule a change to a flag, another user introduces a breaking change, or a conflict.

Conflicts occur for two reasons:

  • Another user updated the flag’s targeting that invalidates one or more of your scheduled changes
  • Another user scheduled a set of conflicting changes to be executed before your changes

LaunchDarkly warns users in the user interface (UI) when they save or schedule changes to the flag that introduce conflicts with other pending scheduled changes.

Here is an image of the Confirm changes dialog:

A notification showing a conflicting scheduled change.
A notification showing a conflicting scheduled change.

Despite this warning, a user could decide to save their conflicting changes anyway.

If this happens, LaunchDarkly sends an email notification to the user whose changes now conflict. That user's changes will not take effect at the time and date they scheduled.

Resolving conflicts in scheduled changes

If your scheduled changes conflict with other changes, you receive an email notification.

Here is an image of the email you could receive:

The email notification users with conflicting changes receive.
The email notification users with conflicting changes receive.

You can resolve the conflict and ensure your scheduled changes don’t fail in one of two ways:

  1. Choose one of the two conflicting changes and delete the other. For example, you may have scheduled three targeting rules to be updated and someone deletes one of those rules, which causes a conflict. If this happens, you can update your scheduled changes to delete the scheduled changes to that rule. This ensures that the conflict is resolved and the remaining rules are updating successfully.
  2. Update the conflicting changes so they no longer conflict. You can update your changes or the new scheduled changes to resolve the conflict and ensure both scheduled changes execute successfully.