IBM Cloud Docs
Scheduled flags

Scheduled flags

Scheduling the toggling of feature flags helps users enable or disable a feature of their choice without having to manually toggle the feature flag whenever an event occurs. You can achieve the scheduling of a feature flag with the help of the Event Notifications Periodic Timer. To learn more about the Periodic Timer, see Periodic Timer.

Scheduling a feature flag toggle

The following steps help a user to schedule the toggle of their feature flags:

  1. Create an Event Notifications instance.

  2. Navigate to your Event Notifications instance dashboard and under Sources, enable the Periodic Timer source.

  3. Create an App Configuration destination under the Destinations tab in the left navigation pane. To learn the process of creating the App Configuration destination, see App Configuration.

  4. Create 2 topics with alternating schedules, one to enable the feature flag and another to disable it, with the Periodic timer as the source under the Topics tab. To set the cron expression for scheduling, refer to Periodic Timer.

  5. Create 2 subscriptions each with one of the topics that were created previously and the App Configuration destination, under the Subscriptions tab. Set one subscription to enable the feature flag and the other to disable the feature flag. You can do this by setting the attribute or defining a template, refer Configuration.

Your configuration is now complete. Your feature flag should be enabled and disabled automatically as per the schedule you have defined.