Skip to content

Commit c560af9

Browse files
changes: group trigger
1 parent 082bd3b commit c560af9

File tree

5 files changed

+93
-4
lines changed

5 files changed

+93
-4
lines changed

src/7-to-8/cheat-sheet.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ Set task outputs:
331331

332332
cylc set --out=succeeded
333333

334-
335334
Insert a task:
336335

337336
.. list-table::
@@ -343,3 +342,19 @@ Insert a task:
343342

344343
cylc insert
345344
- Tasks are inserted automatically when you "trigger" or "set" them.
345+
346+
Re-run a group of tasks in order:
347+
348+
.. list-table::
349+
:class: grid-table
350+
351+
* - **Cylc 7**
352+
- **Cylc 8**
353+
* - ::
354+
355+
# reset the task to waiting, they will then re-run in order
356+
cylc reset -s=waiting cycle1/task1 cycle2/task2 ...
357+
- ::
358+
359+
# trigger the tasks in a single command, they will re-run in order
360+
cylc trigger cycle1/task1 cycle2/task2 ...

src/reference/changes.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,32 @@ Cylc 8.5
3737
:rose: `2.4 <https://github.com/metomi/rose/blob/master/CHANGES.md>`__
3838
3939
40+
Triggering Multiple Tasks
41+
^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+
Cylc now respects the dependencies between tasks when triggering multiple
44+
tasks at the same time. This provides an easy way to re-run a group of tasks
45+
in order:
46+
47+
.. image:: ../reference/changes/group-trigger.gif
48+
:align: center
49+
:width: 65%
50+
51+
|
52+
53+
This is generally easier than :ref:`using a new flow <interventions.reflow>`.
54+
55+
Technical details:
56+
57+
* Prerequisites on any tasks that are outside of the group of tasks being
58+
triggered are automatically satisfied.
59+
* Any tasks which have already run within the group will be automatically
60+
removed (i.e. ``cylc remove``) to allow them to be re-run without
61+
intervention.
62+
* Any preparing, submitted or running tasks within the group will also be
63+
removed if necessary to allow the tasks to re-run in order.
64+
65+
4066
Compatibility Mode
4167
^^^^^^^^^^^^^^^^^^
4268

@@ -65,6 +91,7 @@ to change which tool is used.
6591
Make sure your configured command waits for the tool to be closed before
6692
exiting, e.g. use ``GEDITOR=gvim -f`` rather than ``EDITOR=gvim``.
6793

94+
6895
Cylc Reload
6996
^^^^^^^^^^^
7097

1.69 MB
Loading

src/user-guide/interventions/index.rst

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,48 @@ Re-Run a Task
8888
$ cylc trigger <workflow>//<task>
8989
9090
91+
.. _interventions.re-run-multiple-tasks:
92+
9193
Re-Run Multiple Tasks
9294
---------------------
9395

9496
:Example:
95-
I need to make changes to a task, then re-run it and everything downstream
96-
of it.
97+
I need to re-run a few tasks in order.
98+
99+
:Solution:
100+
Determine the tasks you want to re-run and trigger all of them at the
101+
same time.
102+
103+
We often want to
104+
:ref:`edit the tasks configuration <interventions.edit-a-tasks-configuration>`
105+
before doing this.
106+
107+
.. tab-set::
108+
109+
.. tab-item:: GUI
110+
:sync: gui
111+
112+
.. image:: ./../../reference/changes/group-trigger.gif
113+
:width: 75%
114+
115+
.. tab-item:: CLI
116+
:sync: gui
117+
118+
.. code-block:: console
119+
120+
$ cylc trigger <workflow>// \
121+
> //<cycle-1>/<task-2> \
122+
> //<cycle-2>/<task-2> \
123+
> ...
124+
125+
126+
.. _interventions.reflow:
127+
128+
Re-Run A Task And Everything After It
129+
-------------------------------------
130+
131+
:Example:
132+
I want to reconfigure a task, then re-run it and all tasks downstream of it.
97133

98134
:Solution:
99135
:ref:`Edit the tasks configuration <interventions.edit-a-tasks-configuration>`,
@@ -104,7 +140,7 @@ Re-Run Multiple Tasks
104140
.. tab-item:: GUI
105141
:sync: gui
106142

107-
.. image:: re-run-multiple-tasks.gui.gif
143+
.. image:: reflow.gui.gif
108144
:width: 75%
109145

110146
.. tab-item:: CLI
@@ -114,6 +150,17 @@ Re-Run Multiple Tasks
114150
115151
$ cylc trigger --flow=new <workflow>//<cycle>/<task>
116152
153+
.. warning::
154+
155+
Be aware that tasks which have previously run, will not have run in the
156+
new flow. As a result, you may want to manually set task outputs to allow
157+
the new flow to continue.
158+
159+
You can achieve this by setting the
160+
:ref:`outputs <interventions.set-task-outputs>` of these tasks, or
161+
satisfying the :ref:`prerequisites <interventions.set-task-prerequisites>`
162+
of the tasks in the new flow.
163+
117164

118165
Re-Run All Failed Tasks
119166
-----------------------
File renamed without changes.

0 commit comments

Comments
 (0)