# Run a task only once within jinja2 loop

**URL:** <https://cylc.discourse.group/t/run-a-task-only-once-within-jinja2-loop/1193>\
**Category:** Cylc Support\
**Created:** [June 18, 2025, 9:51am UTC](https://cylc.discourse.group/t/run-a-task-only-once-within-jinja2-loop/1193 "2025-06-18T09:51:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gturek](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@gturek](https://cylc.discourse.group/u/gturek)\
**Post date:** [June 18, 2025, 10:16am UTC](https://cylc.discourse.group/t/run-a-task-only-once-within-jinja2-loop/1193/2 "2025-06-18T10:16:28Z")

</div>

As a follow up to this question we actually tried broadcasting to set the run mode to skip in a post-script to the task. This caused the task to be marked as “failed” and the workflow to stop. I think here we ran into the polling issue that was discussed in @sparonuz’s post [https://cylc.discourse.group/t/cylc-broadcast-error-workflowstopped/](https://cylc.discourse.group/t/cylc-broadcast-error-workflowstopped/). So this approach is definitively not an option

---

_[View the full topic](https://cylc.discourse.group/t/run-a-task-only-once-within-jinja2-loop/1193)._
