• HOME
  • INTEGRATIONS
  • SDKS
  • GUIDES
  • API DOCS
No results for ""
EXPAND ALL
launchdarkly.com

EDIT ON GITHUB

Scheduled flag changes

Read time: 5 minutes
Last edited: Jan 15, 2021
Scheduled flag changes is an Enterprise feature

This feature is only available to customers on Enterprise plans. To learn more about our plans, read about our pricing. To upgrade your account to an Enterprise 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. While this sounds simple, it unlocks the potential to create a progressive delivery strategy by scheduling the incremental steps to release your feature to 100% of your user base.

For example, you may want to schedule the 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 from 0% to 100% over the following five days. Now you can define this feature workflow ahead of time and be confident that it will take effect at the specified date and time.

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.

Benefits of scheduling flag changes

  1. Timing an early launch: LaunchDarkly users no longer need to set reminders or wake up early to turn a flag ON. Scheduling your flag to turn on on a specified date/time allows you to plan your release and let LaunchDarkly do the rest.
  2. Progressive feature rollouts: Using this functionality, 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%. This only requires creating a set of scheduled changes to your flag once and lets you slowly release features and ensure they’re performing the way you hoped they would.
  3. Temporary user access: You can now 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, to practice better flag hygiene and more easily understand the flag's configuration.
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 next to the Save changes button and select Schedule Changes.

The Schedule Changes button below the Save Changes button.
The Schedule Changes button below the Save Changes button.

  1. In the "Schedule change for" 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 modal. If you need to make changes, click Edit, change what you need, and then click Done.

A GIF of the flag scheduling workflow.

  1. Enter a comment and the environment name.
  2. 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.

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

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 opens 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 menu in the upper right and choose Edit.

A GIF of the change editing worklow.

  1. A modal appears with the list of scheduled flag changes.
  2. You can change the schedule by changing the date or time for these changes. Alternatively, you can click Edit to make updates and click Done when complete.
  3. Type in a comment and the environment name.
  4. Hit Update 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 menu to the top-right and click 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 about 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 UI when they save or schedule changes to the flag that introduce conflicts with other pending scheduled changes.

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.

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 3 targeting rules to be updated and someone deletes 1 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.

Scheduling changes that match current flags

You can schedule a change that matches the current state of the flag. To do this, stage placeholder changes and then edit the actions when you schedule them.

Here is an example showing how you can schedule your flag to turn off for an hour, and then turn back on.

  1. Turn flag targeting off.
  2. Click into the Save Changes dropdown and choose Schedule changes.
  3. Click Edit.
  4. Turn the flag to on.
  5. Click Done and schedule the change.

A GIF of the workflow.

This workaround lets you schedule changes to your flag that are not different from the flag's current state. This is useful to help schedule changes that restore the flag’s state after an interval.