# Selectively trigger certain tasks in simulation mode?

**URL:** <https://cylc.discourse.group/t/selectively-trigger-certain-tasks-in-simulation-mode/639>\
**Category:** Cylc Support\
**Created:** [April 28, 2023, 12:59am UTC](https://cylc.discourse.group/t/selectively-trigger-certain-tasks-in-simulation-mode/639 "2023-04-28T00:59:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [April 28, 2023, 12:59am UTC](https://cylc.discourse.group/t/selectively-trigger-certain-tasks-in-simulation-mode/639/1 "2023-04-28T00:59:03Z")

</div>

Hi there,

I’m using `cylc` 8 for this but I don’t think it’s a migration issue _per se_ so am posting in the general support channel.

I’m working with a (for me) complex workflow and would like to be able to selectively trigger tasks to explore precisely how the flow works. Just to emphasise, this is purely a `simulation` thing and wouldn’t make any sense in a live workflow!

For example in the following paused graph, let’s say that I want to hold the simulated workflow and then trigger the circled `postproc_nemo_grid` task, followed by a downstream one and so forth.

I’ve tried ‘releasing’ and ‘triggering’ the tasks but it seems I can only examine the workflow’s progress by ‘playing’ the whole workflow?

Is this right?

Thanks,

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/cabff03cbe0d4b2b606ff164b19c2b01fee4a25d.png)

---

<div class="post-metadata">

**Author:** ![oliver.sanders](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/oliver.sanders/32/110_2.png) [@oliver.sanders](https://cylc.discourse.group/u/oliver.sanders)\
**Post date:** [April 28, 2023, 9:56am UTC](https://cylc.discourse.group/t/selectively-trigger-certain-tasks-in-simulation-mode/639/2 "2023-04-28T09:56:51Z")

</div>

Hi,

When the workflow is paused, no new job submissions will be made (either in live or simulation modes). So triggering tasks will only take effect when the workflow is “unpaused”.

If you want to selectively run some tasks but not others without the workflow advancing as it normally would, try using “hold” and “release”:

```auto
# hold all tasks
$ cylc hold '<workflow-id>//*'

# trigger selected task(s)
$ cylc trigger '<workflow-id>//<cycle>/<task>'

```

Note that holding “all” tasks doesn’t hold tasks which do not yet exist so you might want to run that hold command again after triggering if you want to prevent the workflow running on from these triggered tasks.

Explanation of play/pause vs hold/release:

- Play and pause are a workflow thing. It’s a global status which applies to the scheduler itself.
- Hold and release are a task thing. It’s a local status which applies to a single task.

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [May 1, 2023, 12:51am UTC](https://cylc.discourse.group/t/selectively-trigger-certain-tasks-in-simulation-mode/639/3 "2023-05-01T00:51:42Z")

</div>

that’s brilliant @oliver.sanders, exactly what i wanted.

thanks! 😄
