Skip to content

Commit 8b88bd6

Browse files
committed
Improve Job Script Environment Variables reference
The variable CYLC_WORKFLOW_LOG_DIR was newly added, and existing variables had their descriptions and examples improved, notably adding the run sub-directory to the example paths. Variables have also been slightly reordered to be more logically grouped. The longer name for CYLC_TASK_LOG_ROOT does however make a scrollbar appear, which may be undesirable. Fixes: #779 Signed-off-by: James Frost <[email protected]>
1 parent c3ab1e9 commit 8b88bd6

File tree

3 files changed

+30
-26
lines changed

3 files changed

+30
-26
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/reference/job-script-vars/var-list.txt

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,63 @@ CYLC_VERSION # Version of cylc installation used
22
CYLC_VERBOSE # Verbose mode, true or false
33
CYLC_DEBUG # Debug mode (even more verbose), true or false
44

5-
CYLC_CYCLING_MODE # Cycling mode, e.g. gregorian
5+
CYLC_CYCLING_MODE # Cycling mode, e.g. "gregorian" or "integer"
66
ISODATETIMECALENDAR # Calendar mode for the `isodatetime` command,
77
# defined with the value of CYLC_CYCLING_MODE
88
# when in any datetime cycling mode
9+
CYLC_UTC # UTC mode, True or False
10+
TZ # Set to "UTC" in UTC mode or not defined
911

10-
CYLC_WORKFLOW_FINAL_CYCLE_POINT # Final cycle point
1112
CYLC_WORKFLOW_INITIAL_CYCLE_POINT # Initial cycle point
13+
CYLC_WORKFLOW_FINAL_CYCLE_POINT # Final cycle point
14+
1215
CYLC_WORKFLOW_ID # Workflow ID
13-
# e.g. "a/b/c/run1"
16+
# e.g. "foo/run1" or "a/b/c/run1"
1417
CYLC_WORKFLOW_NAME # Workflow ID with the run name removed
15-
# (use CYLC_WORKFLOW_ID for most purposes)
16-
# e.g. "a/b/c"
18+
# (use CYLC_WORKFLOW_ID for most purposes)
19+
# e.g. "foo" or "a/b/c"
1720
CYLC_WORKFLOW_NAME_BASE # The basename of the workflow name
18-
# (use CYLC_WORKFLOW_ID for most purposes)
19-
# e.g. "c"
20-
CYLC_UTC # UTC mode, True or False
21-
TZ # Set to "UTC" in UTC mode or not defined
21+
# (use CYLC_WORKFLOW_ID for most purposes)
22+
# e.g. "foo" or "c"
23+
CYLC_WORKFLOW_UUID # Workflow UUID string
2224

23-
CYLC_WORKFLOW_RUN_DIR # Location of the run directory in
24-
# job host, e.g. ~/cylc-run/foo
2525
CYLC_WORKFLOW_HOST # Host running the workflow process
2626
CYLC_WORKFLOW_OWNER # User ID running the workflow process
2727

28+
CYLC_WORKFLOW_RUN_DIR # Location of the run directory in job host,
29+
# e.g. ~/cylc-run/foo/run1
30+
CYLC_WORKFLOW_LOG_DIR # Location of the scheduler's log files,
31+
# e.g. ~/cylc-run/foo/run1/log/scheduler
2832
CYLC_WORKFLOW_SHARE_DIR # Workflow (or task!) shared directory
29-
CYLC_WORKFLOW_UUID # Workflow UUID string
30-
CYLC_WORKFLOW_WORK_DIR # Workflow work directory
33+
# e.g. ~/cylc-run/foo/run1/share
34+
CYLC_WORKFLOW_WORK_DIR # Workflow work directory,
35+
# e.g. ~/cylc-run/foo/run1/work
3136

3237
CYLC_TASK_JOB # Job identifier expressed as
33-
# CYCLE-POINT/TASK-NAME/SUBMIT-NUMBER
38+
# CYCLE-POINT/TASK-NAME/SUBMIT-NUMBER
3439
# e.g. 20110511T1800Z/t1/01
35-
40+
CYLC_TASK_ID # Task instance identifier CYCLE-POINT/TASK-NAME
41+
# e.g. 20110511T1800Z/t1
42+
CYLC_TASK_NAME # Job's task name, e.g. t1
3643
CYLC_TASK_CYCLE_POINT # Cycle point, e.g. 20110511T1800Z
3744
ISODATETIMEREF # Reference time for the `isodatetime` command,
3845
# defined with the value of CYLC_TASK_CYCLE_POINT
3946
# when in any datetime cycling mode
4047

41-
CYLC_TASK_NAME # Job's task name, e.g. t1
42-
CYLC_TASK_ID # Task instance identifier CYCLE-POINT/TASK-NAME
43-
# e.g. 20110511T1800Z/t1
44-
4548
CYLC_TASK_SUBMIT_NUMBER # Job's submit number, e.g. 1,
4649
# increments with every submit
4750
CYLC_TASK_TRY_NUMBER # Number of execution tries, e.g. 1
4851
# increments with automatic execution retry delays.
4952
CYLC_TASK_FLOW_NUMBERS # Flows this task belongs to, e.g. 1,2
5053

5154
CYLC_TASK_LOG_DIR # Location of the job log directory
52-
# e.g. ~/cylc-run/foo/log/job/20110511T1800Z/t1/01/
55+
# e.g. ~/cylc-run/foo/run1/log/job/20110511T1800Z/t1/01/
5356
CYLC_TASK_LOG_ROOT # The job script path
54-
# e.g. ~/cylc-run/foo/log/job/20110511T1800Z/t1/01/job
57+
# e.g. ~/cylc-run/foo/run1/log/job/20110511T1800Z/t1/01/job
58+
CYLC_TASK_SHARE_CYCLE_DIR # Cycle point-specific shared directory for this task.
59+
# e.g. ~/cylc-run/foo/run1/share/cycle/20110511T1800Z
5560
CYLC_TASK_WORK_DIR # Location of task work directory (see below)
56-
# e.g. ~/cylc-run/foo/work/20110511T1800Z/t1
57-
CYLC_TASK_SHARE_CYCLE_DIR # The share/cycle/<cycle-point> directory
58-
# for this task.
61+
# e.g. ~/cylc-run/foo/run1/work/20110511T1800Z/t1
5962

6063
CYLC_TASK_NAMESPACE_HIERARCHY # Linearised family namespace of the task,
6164
# e.g. root postproc t1
@@ -65,4 +68,4 @@ CYLC_TASK_SSH_LOGIN_SHELL # With "ssh" communication, if set to "True",
6568
# use login shell on workflow host
6669

6770
CYLC_TASK_PARAM_<param> # If this task is a parameterized task,
68-
# the value of the parameter named <param>
71+
# the value of the parameter named <param>

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
======================= ==============

0 commit comments

Comments
 (0)