Hello, is it possible to automate the activation a...
# ask-questions
e
Hello, is it possible to automate the activation and deactivation of a feature flag periodically ? (Ex : we would like to activate a feature only during the day so from 9am to 6pm)
t
configure a feature flag based on time property value, and pass current time to the property to the evaluation context. would that work for you ?
e
Do you mean : • add an attribute corresponding to time in SDK configuration • go to the feature flag and click on Forced Value • add attribute targeting matching the time attribute to the range I allow the feature flag to be activated ?
t
sdk:
Copy code
value = evaluate("my-flag", Context("time"=currentTime))
flag targeting match condition: "time" attribute value from 9am to 6pm
e
Ok thank you