There’s a whole host of reasons why you may want to schedule the release of a feature, such as:
In this guide we’ll schedule a feature for release at some point in time. The exact same logic applies if you want to make a feature available until some point in the future. Finally, if you want to only make a feature available during a limited time period, you can easily combine the two options.
This guide assumes that you’ve got the following:
Strategy constraints are the easiest way to schedule feature releases (as long as your SDKs are up to date). You can use this approach with any strategy you want. The strategies will work just as they normally do, they just won’t become active until the specified time. For example: with the standard strategy, the feature would become available to all your users at the specified time; with a gradual rollout, the rollout would start at the specified time.
To schedule a feature release via the UI:
currentTime context field (step 1 in the below image), choosing the DATE_AFTER operator (step 2), and setting the point in time where you want the feature to be available from (step 3)
To add an activation strategy via the Admin API, use the feature’s strategies endpoint to add a new strategy (see the API documentation for adding strategies to feature flags for more details):
The payload’s "name" property should contain the name of the strategy to apply (see activation strategies reference documentation for all built-in strategies’ modeling names).
The "constraint" object should have the same format as described in the code sample below. The activation date must be in an RFC 3339-compatible format, e.g. "1990-12-31T23:59:60Z".
The "operator" property in the code sample can be replaced with any of the other date and time-based operators according to your needs.