From ffb19ccf66563095194824bc973fabf6f7026529 Mon Sep 17 00:00:00 2001 From: Thomas Coleman Date: Wed, 3 Apr 2019 09:56:06 +1100 Subject: [PATCH 1/2] Update docs for order of scripts sections init, env, pre, post, err, exit, and script have been adjusted to be displayed in the docs in chronological order. --- doc/src/appendices/suiterc-config-ref.rst | 88 +++++++++++------------ 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/doc/src/appendices/suiterc-config-ref.rst b/doc/src/appendices/suiterc-config-ref.rst index 1821c3875e2..bc80e2788ab 100644 --- a/doc/src/appendices/suiterc-config-ref.rst +++ b/doc/src/appendices/suiterc-config-ref.rst @@ -1290,8 +1290,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) @@ -1306,55 +1306,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 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``, ``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) @@ -1367,15 +1334,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) @@ -1387,13 +1352,46 @@ 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: [runtime] ``->`` [[\_\_NAME\_\_]] ``->`` work sub-directory From 12a6ad246002f1a4f9cfaf1a478259d42108e4d4 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Fri, 5 Apr 2019 09:37:21 +1300 Subject: [PATCH 2/2] Remove old ToDo comment. --- doc/src/appendices/suiterc-config-ref.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/src/appendices/suiterc-config-ref.rst b/doc/src/appendices/suiterc-config-ref.rst index bc80e2788ab..9dc32250529 100644 --- a/doc/src/appendices/suiterc-config-ref.rst +++ b/doc/src/appendices/suiterc-config-ref.rst @@ -1239,9 +1239,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:: - following para here is a '%' thing i.e. not meant 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