@@ -174,19 +174,27 @@ The template's ``%(job)s`` will be substituted by the job file path.
174
174
Job Polling
175
175
-----------
176
176
177
- For supported :term: `job runners <job runner> `, one-way polling can be used to determine actual
178
- job status: the :term: `scheduler ` executes a process on the task host, by
179
- non-interactive ssh, to interrogate the batch queueing system there, and to
180
- read a *status file * that is automatically generated by the :term: `job script `
181
- as it runs.
177
+ For supported :term: `job runners <job runner> `, jobs can be *polled * to
178
+ check that their true state matches what the scheduler expects based on received
179
+ job status messages or previous polls. The :term: `scheduler ` executes a process
180
+ on the task host, by non-interactive ssh, to interrogate the job runner, and to
181
+ read the ``job.status `` file of the task which is automatically generated by the
182
+ :term: `job script ` as it runs.
182
183
183
184
Polling may be required to update the workflow state correctly after unusual
184
- events such as a machine being rebooted with tasks running on it, or network
185
- problems that prevent task messages from getting back to the workflow host.
185
+ events such as
186
+
187
+ - a job gets killed by the untrappable SIGKILL signal (e.g. ``kill -9 PID ``)
188
+ - a machine being rebooted with tasks running on it
189
+ - network problems prevent task messages from getting back to the workflow host
190
+ - the :term: `scheduler ` itself was down when active jobs finished
186
191
187
192
Tasks can be polled on demand by using the
188
193
``cylc poll `` command.
189
194
195
+ .. seealso ::
196
+ - ``cylc poll --help ``
197
+
190
198
Tasks are polled automatically, once, if they timeout while queueing in a
191
199
job runner and submission timeout is set.
192
200
(See :cylc:conf: `[runtime][<namespace>][events] `
@@ -196,34 +204,28 @@ Tasks are polled multiple times, where necessary, when they exceed their
196
204
execution time limits. These are normally set with some initial delays to allow
197
205
the job runners to kill the jobs.
198
206
(See
199
- :cylc:conf: `execution time limit intervals <global.cylc[platforms][<platform name>]execution time limit polling intervals> `
207
+ :cylc:conf: `execution time limit polling intervals <global.cylc[platforms][<platform name>]execution time limit polling intervals> `
200
208
for how to configure the polling intervals).
201
209
202
210
Any tasks recorded in the *submitted * or *running * states at workflow
203
211
restart are automatically polled to determine what happened to them while the
204
212
workflow was down.
205
213
206
- Regular polling can also be configured as a health check on tasks submitted to
207
- hosts that are known to be flaky, or as the sole method of determining task
208
- status on hosts that do not allow task messages to be routed back to the workflow
209
- host.
210
-
211
- To use polling instead of task-to-workflow messaging set
212
- :cylc:conf: `global.cylc[platforms][<platform name>]communication method = poll `.
213
-
214
- The default polling intervals can be overridden in the global configuration:
214
+ By default, regular polling also takes place every 15 minutes whilst a job is
215
+ submitted or running. The default polling intervals can be overridden in the
216
+ global configuration:
215
217
216
- * :cylc:conf: `submission polling intervals< global.cylc[platforms][<platform name>]submission polling intervals> `
217
- * :cylc:conf: `execution polling intervals< global.cylc[platforms][<platform name>]execution polling intervals> `
218
+ * :cylc:conf: `global.cylc[platforms][<platform name>]submission polling intervals `
219
+ * :cylc:conf: `global.cylc[platforms][<platform name>]execution polling intervals `
218
220
219
- Or in workflow configurations (in which case polling will be done regardless
220
- of the communication method configured for the platform):
221
+ The polling intervals can also be configured for individual tasks:
221
222
222
- * :cylc:conf: `submission polling intervals< [runtime][<namespace>]submission polling intervals> `
223
- * :cylc:conf: `execution polling intervals< [runtime][<namespace>]execution polling intervals> `
223
+ * :cylc:conf: `[runtime][<namespace>]submission polling intervals `
224
+ * :cylc:conf: `[runtime][<namespace>]execution polling intervals `
224
225
225
- Note that regular polling is not as efficient as task messaging in updating
226
- task status, and it should be used sparingly in large workflows.
226
+ Polling can be used as the sole method of determining task status on hosts that
227
+ do not allow task messages to be routed back to the workflow host.
228
+ See :ref: `Polling To Track Job Status `.
227
229
228
230
.. note ::
229
231
0 commit comments