Skip to content

Commit

Permalink
Merge pull request #3070 from ColemanTom/minor_exit-script_doc_update…
Browse files Browse the repository at this point in the history
…-7.8.x

Update docs for order of scripts sections
  • Loading branch information
hjoliver authored Apr 4, 2019
2 parents 123bbc1 + d9d1899 commit b25a523
Showing 1 changed file with 43 additions and 48 deletions.
91 changes: 43 additions & 48 deletions doc/src/appendices/suiterc-config-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1256,9 +1256,6 @@ contain letters, digits, underscores, and hyphens. A namespace
represents a group or family of tasks if other namespaces inherit from
it, or a task if no others inherit from it.

.. todo::
follolwing para here is a '%' thing i.e. not ment to be seen /comment:

Names may not contain colons (which would preclude use of directory paths
involving the registration name in ``$PATH`` variables). They
may not contain the "." character (it will be interpreted as the
Expand Down Expand Up @@ -1308,8 +1305,8 @@ environment variables. It can be an external command or script, or inlined
scripting. The original intention for this item was to allow remote tasks to
source login scripts to configure their access to cylc, but this should no
longer be necessary (see :ref:`HowTasksGetAccessToCylc`). See also
``env-script``, ``err-script``, ``exit-script``,
``pre-script``, ``script``, and ``post-script``.
``env-script``, ``pre-script``, ``script``,
``post-script``, ``err-script``, ``exit-script``.

- *type*: string
- *default*: (none)
Expand All @@ -1324,55 +1321,22 @@ Custom script invoked by the task job script between the cylc-defined environmen
so it has access to the cylc environment (and the task environment has
access to variables defined by this scripting). It can be an external command
or script, or inlined scripting. See also ``init-script``,
``err-script``, ``exit-script``, ``pre-script``,
``script``, and ``post-script``.
``pre-script``, ``script``, ``post-script``,
``err-script``, and ``exit-script``.

- *type*: string
- *default*: (none)
- *example*: ``env-script = "echo Hello World"``


[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` exit-script
""""""""""""""""""""""""""""""""""""""""""""""""""""

Custom script invoked at the very end of *successful* job execution, just
before the job script exits. It should execute very quickly. Companion of
``err-script``, which is executed on job failure. It can be an external
command or script, or inlined scripting. See also ``init-script``,
``env-script``, ``exit-script``, ``pre-script``,
``script``, and ``post-script``.

- *type*: string
- *default*: (none)
- *example*: ``exit-script = "rm -f $TMP_FILES"``


[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` err-script
"""""""""""""""""""""""""""""""""""""""""""""""""""

Custom script to be invoked at the end of the error trap, which is triggered
due to failure of a command in the task job script or trapable job kill. The
output of this will always be sent to STDERR and ``$1`` is set to the
name of the signal caught by the error trap. The script should be fast and use
very little system resource to ensure that the error trap can return quickly.
Companion of ``exit-script``, which is executed on job success.
It can be an external command or script, or inlined scripting. See also
``init-script``, ``env-script``, ``exit-script``,
``pre-script``, ``script``, and ``post-script``.

- *type*: string
- *default*: (none)
- *example*: ``err-script = "printenv FOO"``


[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` pre-script
"""""""""""""""""""""""""""""""""""""""""""""""""""

Custom script invoked by the task job script immediately before the ``script``
item (just below). It can be an external command or script, or inlined scripting.
See also ``init-script``, ``env-script``,
``err-script``, ``exit-script``, ``script``, and
``post-script``.
``script``, ``post-script``, ``err-script``, and
``exit-script``.

- *type*: string
- *default*: (none)
Expand All @@ -1385,15 +1349,13 @@ See also ``init-script``, ``env-script``,
echo Hello from suite ${CYLC_SUITE_NAME}!"""
.. _ScriptItem:

[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` script
"""""""""""""""""""""""""""""""""""""""""""""""

The main custom script invoked from the task job script. It can be an
external command or script, or inlined scripting. See also
``init-script``, ``env-script``, ``err-script``,
``exit-script``, ``pre-script``, and ``post-script``.
``init-script``, ``env-script``, ``pre-script``,
``post-script``, ``err-script``, and ``exit-script``.

- *type*: string
- *root default*: (none)
Expand All @@ -1405,11 +1367,44 @@ external command or script, or inlined scripting. See also
Custom script invoked by the task job script immediately after the
``script`` item (just above). It can be an external command or script,
or inlined scripting. See also
``init-script``, ``env-script``, ``err-script``,
``exit-script``, ``pre-script``, and ``script``.
``init-script``, ``env-script``, ``pre-script``,
``script``, ``err-script``, and ``exit-script``.

- *type*: string
- *default*: (none)


[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` err-script
"""""""""""""""""""""""""""""""""""""""""""""""""""

Custom script to be invoked at the end of the error trap, which is triggered
due to failure of a command in the task job script or trappable job kill. The
output of this will always be sent to STDERR and ``$1`` is set to the
name of the signal caught by the error trap. The script should be fast and use
very little system resource to ensure that the error trap can return quickly.
Companion of ``exit-script``, which is executed on job success.
It can be an external command or script, or inlined scripting. See also
``init-script``, ``env-script``, ``pre-script``,
``script``, ``post-script``, and ``exit-script``.

- *type*: string
- *default*: (none)
- *example*: ``err-script = "printenv FOO"``


[runtime] ``->`` [[\_\_NAME\_\_]] ``->`` exit-script
""""""""""""""""""""""""""""""""""""""""""""""""""""

Custom script invoked at the very end of *successful* job execution, just
before the job script exits. It should execute very quickly. Companion of
``err-script``, which is executed on job failure. It can be an external
command or script, or inlined scripting. See also ``init-script``,
``env-script``, ``pre-script``, ``script``,
``post-script``, and ``err-script``.

- *type*: string
- *default*: (none)
- *example*: ``exit-script = "rm -f $TMP_FILES"``


.. _worksubdirectory:
Expand Down

0 comments on commit b25a523

Please sign in to comment.