# Dynamic Alarm Pipeline Delay

**URL:** <https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 12, 2023, 8:09pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551 "2023-01-12T20:09:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorenzo.mateo](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@lorenzo.mateo](https://forum.inductiveautomation.com/u/lorenzo.mateo)\
**Post date:** [January 12, 2023, 8:09pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551/1 "2023-01-12T20:09:46Z")

</div>

Is there a way to set an alarm pipeline's delay block dynamically? like using a string from an alarm's label, etc. to set the delay block's value.

Were currently using a fixed alarm delay but we would like to make a one-size-fits all alarm pipeline that can cater different settings.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2023, 11:11pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551/2 "2023-01-12T23:11:38Z")

</div>

The delay block can't be configured, but you can set it to the least-common-factor of the different delays you want to use, then loop the pipeline around the delay block, incrementing a counter, until your desired delay is met.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 29, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551/3 "2024-03-29T17:07:30Z")

</div>

How do you feel about a script block using `sleep(event['some_associated_data_with_a_configured_delay'])` ?

I kinda feel like I already know the answer, which is likely to be the same as always when we mention `sleep`, but I figured I'd ask.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 29, 2024, 5:12pm UTC](https://forum.inductiveautomation.com/t/dynamic-alarm-pipeline-delay/68551/4 "2024-03-29T17:12:36Z")

</div>

Yeah, I don't know offhand the threading strategy used in alarm pipelines, but I can tell you that the delay block uses a dedicated async thread for the blocking operation, distinct from the main execution thread. You can't really do that via scripting. Unsafe, I would not attempt, etc.
