Skip to content

Commit d9674a7

Browse files
Merge pull request #853 from jfrost-mo/job_script_environment_variables
Improve Job Script Environment Variables reference
2 parents c3ab1e9 + 9ff59d2 commit d9674a7

File tree

8 files changed

+127
-74
lines changed

8 files changed

+127
-74
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ requests_).
5757
- Scott Wales
5858
- Elliot Fontaine
5959
- Mark Dawson
60+
- James Frost
6061
<!-- end-shortlog -->
6162

6263
(All contributors are identifiable with email addresses in the git version

src/dictionaries/proper_nouns

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Gantt
1414
Gedit
1515
Graphene
1616
Graphviz
17+
Gregorian
1718
GScan
1819
Heathrow
1920
Hoverwork

src/dictionaries/words

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ auth
88
authenticator
99
authoriser
1010
backticks
11+
basename
1112
baz
1213
boolean
1314
booleans
@@ -51,6 +52,7 @@ freeform
5152
fullmatch
5253
globals
5354
graining
55+
gregorian
5456
gscan
5557
hardcodes
5658
hardwired
@@ -81,6 +83,7 @@ kwarg
8183
kwargs
8284
latin
8385
lifecycle
86+
linearised
8487
linearization
8588
linter
8689
linting
@@ -100,6 +103,7 @@ obs
100103
offline
101104
onwards
102105
packjob
106+
param
103107
parameterization
104108
parameterize
105109
parameterized
@@ -108,10 +112,12 @@ passX
108112
passphrase
109113
passwordless
110114
performant
115+
pings
111116
placeholder
112117
placeholders
113118
plugin
114119
plugins
120+
postproc
115121
postprocessing
116122
pre
117123
predated

src/reference/job-script-vars/index.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Job Script Environment Variables
44
These environment variables provided by the :term:`scheduler` are available
55
to Cylc job scripts at run time:
66

7-
.. literalinclude:: var-list.txt
8-
:language: sub
9-
7+
.. include:: var-list.rst
108

119
.. seealso::
1210

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
CYLC_VERSION
2+
Version of cylc installation used
3+
4+
CYLC_VERBOSE
5+
Verbose mode, true or false
6+
7+
CYLC_DEBUG
8+
Debug mode (even more verbose), true or false
9+
10+
CYLC_CYCLING_MODE
11+
Cycling mode, e.g. "gregorian" or "integer"
12+
13+
ISODATETIMECALENDAR
14+
Calendar mode for the ``isodatetime`` command, defined with the value of
15+
CYLC_CYCLING_MODE when in any datetime cycling mode
16+
17+
CYLC_UTC
18+
UTC mode, True or False
19+
20+
TZ
21+
Set to "UTC" in UTC mode or not defined
22+
23+
CYLC_WORKFLOW_INITIAL_CYCLE_POINT
24+
Initial cycle point
25+
26+
CYLC_WORKFLOW_FINAL_CYCLE_POINT
27+
Final cycle point
28+
29+
CYLC_WORKFLOW_ID
30+
Workflow ID e.g. "foo/run1" or "a/b/c/run1"
31+
32+
CYLC_WORKFLOW_NAME
33+
Workflow ID with the run name removed (use CYLC_WORKFLOW_ID for most
34+
purposes) e.g. "foo" or "a/b/c"
35+
36+
CYLC_WORKFLOW_NAME_BASE
37+
The basename of the workflow name (use CYLC_WORKFLOW_ID for most purposes)
38+
e.g. "foo" or "c"
39+
40+
CYLC_WORKFLOW_UUID
41+
Workflow UUID string
42+
43+
CYLC_WORKFLOW_HOST
44+
Host running the workflow process
45+
46+
CYLC_WORKFLOW_OWNER
47+
User ID running the workflow process
48+
49+
CYLC_WORKFLOW_RUN_DIR
50+
Location of the run directory in job host, e.g. ~/cylc-run/foo/run1
51+
52+
CYLC_WORKFLOW_LOG_DIR
53+
Location of the scheduler's log files, e.g.
54+
~/cylc-run/foo/run1/log/scheduler
55+
56+
CYLC_WORKFLOW_SHARE_DIR
57+
Workflow (or task!) shared directory e.g. ~/cylc-run/foo/run1/share
58+
59+
CYLC_WORKFLOW_WORK_DIR
60+
Workflow work directory, e.g. ~/cylc-run/foo/run1/work
61+
62+
CYLC_TASK_JOB
63+
Job identifier expressed as CYCLE-POINT/TASK-NAME/SUBMIT-NUMBER e.g.
64+
20110511T1800Z/t1/01
65+
66+
CYLC_TASK_ID
67+
Task instance identifier CYCLE-POINT/TASK-NAME e.g. 20110511T1800Z/t1
68+
69+
CYLC_TASK_NAME
70+
Job's task name, e.g. t1
71+
72+
CYLC_TASK_CYCLE_POINT
73+
Cycle point, e.g. 20110511T1800Z
74+
75+
ISODATETIMEREF
76+
Reference time for the ``isodatetime`` command, defined with the value of
77+
CYLC_TASK_CYCLE_POINT when in any datetime cycling mode
78+
79+
CYLC_TASK_SUBMIT_NUMBER
80+
Job's submit number, e.g. 1, increments with every submit
81+
82+
CYLC_TASK_TRY_NUMBER
83+
Number of execution tries, e.g. 1 increments with automatic execution retry
84+
delays.
85+
86+
CYLC_TASK_FLOW_NUMBERS
87+
Flows this task belongs to, e.g. 1,2
88+
89+
CYLC_TASK_LOG_DIR
90+
Location of the job log directory e.g.
91+
~/cylc-run/foo/run1/log/job/20110511T1800Z/t1/01/
92+
93+
CYLC_TASK_LOG_ROOT
94+
The job script path e.g.
95+
~/cylc-run/foo/run1/log/job/20110511T1800Z/t1/01/job
96+
97+
CYLC_TASK_SHARE_CYCLE_DIR
98+
Cycle point-specific shared directory for this task. e.g.
99+
~/cylc-run/foo/run1/share/cycle/20110511T1800Z
100+
101+
CYLC_TASK_WORK_DIR
102+
Location of task work directory (see below) e.g.
103+
~/cylc-run/foo/run1/work/20110511T1800Z/t1
104+
105+
CYLC_TASK_NAMESPACE_HIERARCHY
106+
Linearised family namespace of the task, e.g. root postproc t1
107+
108+
CYLC_TASK_COMMS_METHOD
109+
Set to "ssh" if communication method is "ssh"
110+
111+
CYLC_TASK_SSH_LOGIN_SHELL
112+
With "ssh" communication, if set to "True", use login shell on workflow host
113+
114+
CYLC_TASK_PARAM\_\<param\>
115+
If this task is a parameterized task, the value of the parameter named
116+
\<param\>

src/reference/job-script-vars/var-list.txt

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/user-guide/writing-workflows/jinja2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ installed workflow at run time:
159159
.. table::
160160

161161
======================= ==============
162-
CYLC_WORKFLOW_LOG_DIR Workflow log sub-directory
162+
CYLC_WORKFLOW_LOG_DIR Workflow scheduler's log directory
163163
CYLC_WORKFLOW_SHARE_DIR Workflow share sub-directory
164164
CYLC_WORKFLOW_WORK_DIR Workflow work sub-directory
165165
======================= ==============

src/user-guide/writing-workflows/runtime.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ Job Script Variables
291291
These variables provided by the :term:`scheduler` are available to
292292
:term:`job scripts <job script>`:
293293

294-
.. literalinclude:: ../../reference/job-script-vars/var-list.txt
295-
:language: sub
294+
.. include:: ../../reference/job-script-vars/var-list.rst
296295

297296
Some global shell variables are also defined in the job script, but not
298297
exported to subshells:

0 commit comments

Comments
 (0)