@@ -10,53 +10,115 @@ workflows.
10
10
11
11
12
12
.. _user_guide.scheduler.workflow_event_handling :
13
+ .. _user_guide.scheduler.workflow_events :
13
14
14
- Workflow Event Handling
15
- -----------------------
15
+ Workflow Events
16
+ ---------------
16
17
17
- Workflow event handlers allow configured commands to run when workflow events
18
- occur.
18
+ There are two types of event in Cylc:
19
19
20
- .. note ::
20
+ * workflow events e.g. ``startup `` and ``shutdown ``, which pertain to the :term: `scheduler `
21
+ * task events e.g. ``submitted `` and ``failed ``, which pertain to :term: `tasks <task> `.
21
22
22
- Cylc supports workflow events e.g. `` startup `` and `` shutdown ``
23
- and task events e.g. `` submitted `` and `` failed ` `.
23
+ This section covers workflow events, for
24
+ task events see :ref: ` user_guide.runtime.task_event_handling `.
24
25
25
- See also :ref: ` user_guide.runtime.task_event_handling `.
26
+ .. rubric :: Event Handlers
26
27
27
- Workflow event handlers are configured by:
28
+ Workflow events have "handlers" (i.e. hooks) which allow configured commands to
29
+ run when workflow events occur. These can be configured by:
28
30
29
31
* :cylc:conf: `flow.cylc[scheduler][events] ` (per workflow)
30
32
* :cylc:conf: `global.cylc[scheduler][events] ` (user/site defaults)
31
33
34
+ .. rubric :: Abort On Event
32
35
33
- Workflow Events
34
- ^^^^^^^^^^^^^^^
36
+ As well as event handlers, you can tell the scheduler to abort (i.e., shut down
37
+ immediately with error status) on certain workflow events, using the
38
+ ``abort on ... `` configurations.
39
+
40
+ .. rubric :: Configuration
41
+
42
+ Some workflow events have related configurations e.g. for setting the timeout.
43
+
44
+ .. rubric :: List of workflow events:
45
+
46
+ .. cylc-scope :: global.cylc[scheduler][events]
47
+
48
+ .. describe :: startup
49
+
50
+ :Event Handler: `startup handlers `
35
51
36
- The list of events is:
52
+ The scheduler was started or restarted.
53
+
54
+ E.G. using one of these commands ``cylc play ``, ``cylc vip `` or ``cylc vr ``.
55
+
56
+ .. describe :: shutdown
57
+
58
+ :Event Handler: `shutdown handlers `
59
+
60
+ The scheduler was shut down.
61
+
62
+ E.G. using the ``cylc stop `` command.
63
+
64
+ .. describe :: abort
65
+
66
+ :Event Handler: `abort handlers `
37
67
38
- startup
39
- The scheduler started running the workflow.
40
- shutdown
41
- The workflow finished and the scheduler will shut down.
42
- abort
43
68
The scheduler shut down early with error status, due to a fatal error
44
69
condition or a configured timeout.
45
- workflow timeout
70
+
71
+ .. describe :: workflow timeout
72
+
73
+ :Configuration: `workflow timeout `
74
+ :Event Handler: `workflow timeout handlers `
75
+ :Abort On Event: `abort on workflow timeout `
76
+
46
77
The workflow run timed out.
47
- stall
48
- The workflow stalled.
49
- stall timeout
78
+
79
+ The timer starts counting down at scheduler startup. It resets on workflow
80
+ restart.
81
+
82
+ Note, the ``abort `` event is not raised by "Abort On Event" handlers.
83
+
84
+ .. describe :: stall
85
+
86
+ :Event Handler: `stall handlers `
87
+
88
+ The workflow :term: `stalled <stall> ` (i.e. the scheduler cannot make any
89
+ further progress due to runtime events).
90
+
91
+ E.G. a task failure is blocking the pathway through the graph.
92
+
93
+ .. describe :: stall timeout
94
+
95
+ :Configuration: `stall timeout `
96
+ :Event Handler: `stall timeout handlers `
97
+ :Abort On Event: `abort on stall timeout `
98
+
50
99
The workflow timed out after stalling.
51
- inactivity timeout
52
- The workflow timed out with no activity.
53
100
54
- You can tell the scheduler to abort (i.e., shut down immediately with error
55
- status) on certain workflow events, with the following settings:
101
+ .. describe :: inactivity timeout
102
+
103
+ :Configuration: `inactivity timeout `
104
+ :Event Handler: `inactivity timeout handlers `
105
+ :Abort On Event: `abort on inactivity timeout `
106
+
107
+ The workflow timed out with no activity (i.e. a period with no job
108
+ submissions or task messages).
109
+
110
+ This can be useful for system administrators to help catch workflows which
111
+ have become stalled on external conditions or system issues.
112
+
113
+ .. describe :: restart timeout
114
+
115
+ :Configuration: `restart timeout `
116
+
117
+ If a workflow that has run to completion is restarted, the scheduler will
118
+ have nothing to do so will shut down. This timeout gives the user a grace
119
+ period in which to trigger new tasks to continue the workflow run.
56
120
57
- - abort on stall timeout
58
- - abort on inactivity timeout
59
- - abort on workflow timeout
121
+ .. cylc-scope ::
60
122
61
123
Mail Events
62
124
^^^^^^^^^^^
0 commit comments