Skip to content

Commit ea337a4

Browse files
committed
Redo trigger CLI help.
1 parent 5654150 commit ea337a4

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

cylc/flow/scripts/trigger.py

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,27 @@
1717

1818
"""cylc trigger [OPTIONS] ARGS
1919
20-
Force task(s) to run, even in a paused workflow.
20+
Force tasks to run, even in a paused workflow.
21+
22+
For a group of tasks, off-group prerequisites will be satisfied automatically
23+
to prevent a stall, and in-group prerequisites will respected by the flow.
24+
25+
By default flow history of target tasks will be removed to allow rerun in the
26+
same flow. Use the `--flow` option to trigger a new flow.
2127
2228
Triggering a task that is not yet queued will queue it; triggering a queued
2329
task will run it - so un-queued tasks may need to be triggered twice.
2430
2531
Tasks can't be triggered if already active (preparing, submitted, running).
2632
27-
Triggering a group of tasks at once:
28-
Dependence on tasks beyond the group ("off-group prerequisites") will be
29-
satisfied automatically; in-group prerequisites will be left to the flow.
33+
Group trigger is normally the easiest way to manually (re)run a sub-graph.
3034
31-
Triggering a sub-graph:
32-
* Group approach: trigger all sub-graph tasks as a group. The forced
33-
satisfaction of off-group prerequisites will automatically avoid a stall.
34-
* Fundamental approach: trigger the initial tasks of the sub-graph to start
35-
the flow, and manually set off-flow prerequisites to prevent a stall.
35+
Otherwise, use `cylc set` to manually satisfy all off-flow prerequisites (or
36+
trigger initial tasks and set other off-flow prerequisites) after erasing
37+
(to rerun in the same flow) flow history with `cylc remove`.
3638
37-
Triggering past tasks:
38-
If flows are not specified (i.e., no use of --flow) the flow-history of
39-
target tasks will be erased (see also "cylc remove") so that the graph can
40-
be re-traversed without starting a new flow.
41-
Rarely, you may want to retain flow history even if not starting a new flow.
42-
If so, use `--flow=all` avoid the erasure. Example: triggering a task twice
43-
with `--wait` to complete different outputs.
39+
Use `-flow=all` to trigger without erasing flow history or starting a new flow,
40+
e.g. to trigger a task twice with `--wait` to complete different outputs.
4441
4542
Examples:
4643
# trigger task foo in cycle 1234 in test
@@ -52,6 +49,14 @@
5249
# start a new flow by triggering 1234/foo in test
5350
$ cylc trigger --flow=new test//1234/foo
5451
52+
# rerun (same flow) `a => b & c` ignoring off-group prerequisite `off => b`
53+
$ cylc trigger test //1234/a //1234/b //1234/c
54+
55+
# rerun (same flow) `a => b & c` ignoring `off => b`, the flow-native way
56+
$ cylc remove test //1234/a //1234/b //1234/c # erase flow history
57+
$ cylc trigger test//1234/a # trigger initial task
58+
$ cylc set --pre=1234/off test//1234/b # satisfy off-flow prerequisites
59+
5560
Cylc queues:
5661
Queues limit how many tasks can be active (preparing, submitted, running) at
5762
once. Tasks that are ready to run will remained queued until the active task
@@ -68,8 +73,8 @@
6873
* by default they are assigned all active flows
6974
* otherwise, they are assigned the --flow value
7075
71-
Note --flow=new increments the global flow counter with each use. If it
72-
takes multiple commands to start a new flow use the actual flow number
76+
Note --flow=new increments the global flow counter with each use. If it takes
77+
multiple commands to start a new flow use the actual flow number
7378
after the first command (you can read it from the scheduler log).
7479
"""
7580

0 commit comments

Comments
 (0)