# Activate a tag for a while

**URL:** <https://forum.inductiveautomation.com/t/activate-a-tag-for-a-while/36433>\
**Category:** Ignition\
**Created:** [July 7, 2020, 1:50pm UTC](https://forum.inductiveautomation.com/t/activate-a-tag-for-a-while/36433 "2020-07-07T13:50:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [July 7, 2020, 1:50pm UTC](https://forum.inductiveautomation.com/t/activate-a-tag-for-a-while/36433/1 "2020-07-07T13:50:04Z")

</div>

Hello,

I wanted to activate a boolean tag for a specific time, and automatically deactivate it when that time passes. any ideas to do it?  
thank you

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [July 7, 2020, 1:58pm UTC](https://forum.inductiveautomation.com/t/activate-a-tag-for-a-while/36433/2 "2020-07-07T13:58:44Z")

</div>

Use an expression tag to setup your timing, then on a tag change event run a script to [configure the tag’s enabled attribute](https://docs.inductiveautomation.com/display/DOC80/system.tag.configure) of the tag you want to control for v8, for v7.9 you will [edit tag](https://docs.inductiveautomation.com/display/DOC79/system.tag.editTag)

**EDIT** Not sure if I miss read your post, but the above is to enable and disable the tag, if you want a flasher type function on a Boolean try this in an expression.

```auto
toMillis(now(5000)) % 10000 < 5000

```

This will flash on and off for 5 sec intervals

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [July 7, 2020, 2:09pm UTC](https://forum.inductiveautomation.com/t/activate-a-tag-for-a-while/36433/3 "2020-07-07T14:09:08Z")

</div>

thanks for your reply.  
I will test with your solution.
