Rose User Guide: Running Tasks

Introduction

This chapter of the user guide discusses the Rose suite tools and utilities that can be used to simplify the logic of a suite and/or provide a common approach of doing the same things.

rose task-run

The rose task-run command selects and launches an application (according to an application configuration) under the environment of a job (of a task) in a suite.

See Rose Reference Guide: CLI > rose task-run for a full command reference.

See Rose Reference Guide: Configuration > Configuration Format for more information on the Rose configuration format.

See Rose Reference Guide: Configuration > Application Configuration for more information on how to set up a Rose application configuration.

Working Directory

The working directory of a task is dependent on the suite engine. For a task running under cylc, the working directory of a task is normally $ROSE_SUITE_DIR/work/$ROSE_TASK_CYCLE_TIME/$ROSE_TASK_NAME/, (or $ROSE_SUITE_DIR/work/1/$ROSE_TASK_NAME/ for a non-cycling task.)

The rose task-run (or the rose app-run) command also dumps out a rose-app-run.conf file in the working directory. The file contains the original rose-app.conf in the application configuration with any added optional configurations and command line settings set via --define=[SECTION]NAME=VALUE.

Application Configuration Selection

The rose task-run command selects its application configuration in the following order:

  1. If the --config=DIR option is specified, it uses the value of DIR as the path to the application configuration directory.
  2. If the --app-key=KEY option is specified, it uses the KEY sub-directory under the suite's app/ directory as the application configuration directory.
  3. If the ROSE_TASK_APP=KEY environment variable is specified, it uses the KEY sub-directory under the suite's app/ directory as the application configuration directory.
  4. Finally, it looks at the suite's app/ directory for an application configuration directory that matches the name of the task. (The command fails if it is unable to locate an application configuration.)

Environment Variables Export

The rose task-run command exports a set of ROSE_* environment variables to its environment before doing anything. The list is documented in Rose Reference Guide: CLI > rose task-env.

The rose task-run command also sets up the PATH environment variable and if relevant, other PATH-like environment variables, (e.g. PYTHONPATH). The following logic is applied in order:

  1. The command looks for [rose-task-run]path-prepend.NAME settings in the site/user configuration files, where NAME is PATH or the name of a PATH-like variable. (The [rose-task-run]path-prepend setting can be used as a shorthand for [rose-task-run]path-prepend.PATH.) The values of these settings are expected to be space delimited lists of directory paths. For each directory path, the command will check that it exists before prepending it to relevant environment variable. E.g.:
    [rose-task-run]
    # Prepend /opt/hello/bin /opt/greeting/bin to $PATH
    path-prepend=/opt/hello/bin /opt/greeting/bin
    # Prepend /opt/stuff/lib/perl to $PERL5LIB
    path-prepend.PERL5LIB=/opt/stuff/lib/perl
    
  2. The command looks for directories under $ROSE_SUITE_DIR that match the glob patterns share/fcm[_-]make*/*/bin, work/fcm[_-]make*/*/bin. Matched directories are added to the PATH environment variable.
  3. The command accepts one or more --path=[NAME=]PATTERN command line option. Each of these specify a glob pattern for paths to prepend to an environment variable called NAME (or PATH if NAME is not specified). If a relative path is given, it is relative to $ROSE_SUITE_DIR. An empty value resets anything prepended in (1.) and (2.) above and any previous --path=[NAME=]PATTERN settings for the relevant environment variable.

The rose task-run command (or the rose app-run command) also exports each environment variables in the [env] section in the application configuration file. N.B.:

  • The environment variables are exported in no particular order, so they should not reference one another.
  • $NAME and ${NAME} syntax in values of the settings are substituted by the value of the environment variable NAME. The command does not support any other Unix shell variable substitution/manipulation syntax, nor does it support any Unix shell syntax for sub-shell command substitution. The command fails if NAME is not an environment variable. You can escape a substitution by adding a backslash in front of the syntax, e.g. \$NAME or \${NAME}.

The following is an example of using environment variables:

[command]
default=echo "$HELLO $WORLDS"

[env]
HELLO=Greeting
WORLDS=Mars Jupiter Saturn

Most other sections in the application configuration file, (e.g. the file installation sections and the application command) can reference the exported environment variables described above.

Finally, if the application configuration has a bin/ sub-directory, the rose task-run command (or the rose app-run command) will prepend its location in front of the PATH environment variable.

File Installation

The rose task-run command (or the rose app-run command) can be configured to install files to the working directory or other locations in the suite. It does the following:

  • Install items specified in the [file:*] sections of the rose-app.conf file. See Rose Reference Guide: Configuration > Appendix: File Creation Mode for detail.
  • Copy any regular files under the file/ sub-directory of the application configuration to the working directory.

    Note: If there is a clash between a [file:*] section and a file under file/, the setting in the [file:*] section takes precedence. E.g. Suppose we have a file file/hello.txt. In the absence of [file:hello.txt], it will copy file/hello.txt to $PWD/hello.txt in run time. However, if we have a [file:hello.txt] section and a source=SOURCE setting, then it will install the file from SOURCE instead. If we have [!file:hello.txt], then the file will not be installed at all.

If the command for the application requires some pre-defined standard input, a file called STDIN can be installed in the working directory. When the command is invoked, the contents of the file will be piped to the standard input of the command.

The rose task-run command (or the rose app-run command) caches file installation settings in the .rose-config_processors-file.db file in the working directory. This allows file installation to be incremental. If the task is run again, identical files will not have to be reinstalled.

Command Selection

By default, the rose task-run command (or the rose app-run command) invokes a shell command. (Alternatively, the rose task-run command invokes a built-in application. See Built-in Applications Selection for detail.) It uses the following logic to select a shell command to run:

  1. If arguments are supplied to rose task-run, the arguments are run as a shell command.
  2. If the --command-key=KEY option is specified, the command specified in the [command]KEY setting in the application configuration file is used.
  3. If the ROSE_APP_COMMAND_KEY environment variable is set, the command specified in the [command]KEY setting in the application configuration whose KEY matches it is used.
  4. If the [command] section in the application configuration file has a key matching the task name, the command specified in this setting is used.
  5. Otherwise, the command specified in the [command]default setting is used.

This mechanism allows, for example, similar tasks to share the same application configuration, if most of their differences can be defined at the command line.

E.g.

[command]
default=echo Hello World
hello_earth=echo Hello Earth
greet_martians=echo Greeting Martians

In the above example, if the command key is hello_earth, the application will echo Hello Earth. If the command key is not defined, but the task name is greet_martians, the application will echo Greeting Martians. For any other tasks using this application configuration and if the command key is not defined, it will echo Hello World.

Built-in Applications Selection

Apart from running a shell command, the rose task-run command (or the rose app-run command) may be configured to call a built-in application. To use a built-in application, add the mode=KEY top level setting in the application configuration, where KEY is the name of a built-in application. (Each built-in application is discussed individually later in this chapter.)

A built-in application would normally behave very much like running an external command. The key differences are normally that:

  1. A built-in application may use a different working directory to a Rose application.
  2. A built-in application will run some pre-defined commands or logic instead of a command defined in the application configuration.

Poll for Prerequisites

Prerequisites of a task should normally be defined at the suite level. However, there are times when it is more efficient to poll for a simple prerequisite before running a command. The rose task-run command (or the rose app-run command) provides a facility for tasks to poll for some prerequisites before running the application command. The facility supports 3 types of tests:

  • Poll all files This can be configured by adding the [poll]all-files setting in the application configuration file. The value of the setting is expected to be a list of space delimited list of items. Each item can be a file path or a file glob pattern. This test passes only if all items in the list exist. E.g. a list with file1 file2 file3* means that file1, file2 and any file matching the glob pattern file3* must exist for the test to pass.
  • Poll any files This can be configured by adding the [poll]any-files setting in the application configuration file, as above. This test passes if any item in the list exists. E.g. a list with file1 file2 file3* means that file1, file2 or any file matching the glob pattern file3* must exist for the test to pass.
  • Poll with a shell command This can be configured by adding the [poll]test setting in the application configuration file. The value of the setting is expected to be a shell command. This test passes if the command returns a 0 (zero) return code.

Normally, both all-files and any-files test for the existence of file paths. If this is not enough, you can specify a [poll]file-test setting to run a command on each file. E.g. if you want to test for the existence of a string in each file, you can do:

all-files=file1 file2
file-test=test -e {} && grep -q 'hello' {}

At runtime, any {} pattern in the above is replaced with the name of the file. The above example checks that both file1 and file2 exist and that they both contain the string hello.

By default, tests will only be performed once. If a list of delays is added, the tests will be performed a number of times with delays between them. If the prerequisites are still not met after the number of delays, rose task-run will fail with a time out. The delays list is a comma-separated list. The syntax looks like [R*][P], where R is the number of repeats, P is the ISO8601 date-time format syntax, see wikipedia entry (last checked on 2015-05-29). E.g.:

# Default
delays=0

# Poll 1 minute after the runner begins, repeat every minute 10 times
delays=10*PT1M

# Poll when runner begins,
# repeat every 10 seconds 6 times,
# repeat every minute 60 times,
# repeat once after 1 hour,
# repeat once after 1 week, 2 days, 6 hours and 30 seconds
delays=0,6*PT10S,60*PT1M,PT1H,P1W2DT6H30S

Built-in Application: fcm_make

The fcm_make built-in applications is provided for running fcm make.

N.B.:

  • If a task has a name that contains the string fcm_make, rose task-run will run this built-in application automatically.
  • N.B. If a task has a name that contains the string fcm_make2* and it does not have its own application configuration, rose task-run will attempt to associate it with the corresponding fcm_make* application configuration.
  • In the default setting, the bin/ directories of builds will be prepended to the PATH environment variable by rose task-env and/or rose task-run commands run by subsequent tasks in the suite.

The fcm_make application expects a file file/fcm-make.cfg in its application configuration. It runs fcm make using this configuration file.

You can configure these applications with environment variables or settings in rose-app.conf. (Settings in rose-app.conf override their equivalent environment variables.)

args=ARG ... or the environment variable ROSE_TASK_OPTIONS
This can be used to pass extra options and arguments to the fcm make command.
dest-orig=PATH
Specify the path to the destination of the original make. This is normally specified as a relative path under $ROSE_SUITE_DIR/. The default is share/$ROSE_TASK_NAME. If rose task-run is invoked in --new mode, the application will remove this directory before running fcm make --new.
dest-cont=PATH
Specify the path to the destination of the continuation make. This is normally specified as a relative path under $ROSE_SUITE_DIR/. The default is to use the same location as dest-orig. If rose task-run is invoked in --new mode, the application will remove this directory before running fcm make --new. (If this location is in the same physical location of the destination of the original make, you should only invoke rose task-run --new on the original make. Otherwise, contents generated by the original make will be wiped clean before the continuation make begins.)
fast-dest-root-orig=PATH
Specify the path to an existing location that can be used as a fast working directory for the original make. If this is specified, the fcm make command will be invoked in a temporary directory under this location before being copied back to the actual destination.
fast-dest-root-cont=PATH
Specify the path to an existing location that can be used as a fast working directory for the continuation make. If this is specified, the fcm make command will be invoked in a temporary directory under this location before being copied back to the actual destination.
make-name-orig=NAME
Specify the context name of the original make. The default is a null string. You can specify an alternate context name if this is undesirable. The fcm make command will be invoked with the --name=NAME option of fcm make.
make-name-cont=NAME
Specify the context name of the continuation make. If the default fcm_makefcm_make2 mapping is used, the context name of the continuation make will be set to 2. You can specify an alternate context name if this is undesirable. The continuation command will be invoked with the --name=NAME option of fcm make.
mirror-step=STEP-NAME
Specify the name of the mirror step, if not mirror. The application will normally look for a matching task in the suite (e.g. fcm_makefcm_make2) which will continue the fcm make command at a remote HOST. If such a task is found, it will add the configuration mirror.target=HOST:cylc-run/$ROSE_SUITE_NAME/share/$ROSE_TASK_NAME as an argument to the fcm make command to substitute the mirror target. To switch off this feature, set STEP-NAME to a null string, i.e. mirror-step=.
opt.jobs=N or the environment variable ROSE_TASK_N_JOBS
This can be used to control the number of processes fcm make would use in parallel. (default=4)
orig-cont-map=ORIG-NAME:CONT-NAME
This setting allows you to override the default fcm_makefcm_make2 mapping between the names of the original and the continuation tasks in the suite.
use-pwd=true
By default, the application changes the working directory to $ROSE_SUITE_DIR/share/$ROSE_TASK_NAME. This option will stop this, and the working directory is the normal working directory of the task.

E.g.:

meta=fcm_make
mode=fcm_make
opt.jobs=8

Built-in Application: rose_ana

This built-in application runs rose-ana, the Rose analysis engine. This performs various configurable analysis steps; for example a common usage is to compare 2 files and report whether they differ or not. It can writes the details of any comparisons it runs to a database in the suite's log directory to assist with any automated updating of control data (see the guide linked below for more details).

In automatic selection mode, this built-in application will be invoked automatically if a task has a name that starts with rose_ana*.

The built-in application will search for suitable analysis modules to load firstly in the ana subdirectory of the rose-ana app, then in the ana subdirectory of the top-most suite directory. Any additional directories to search (for example a site-wide central directory) may be specified in the rose.conf file using the method-path variable in the [rose-ana] section. Finally the ana_builtins subdirectory of the Rose installation itself contains any built-in comparisons.

See also rose stem > Comparing output with rose_ana.

Built-in Application: rose_arch

This built-in application provides a generic solution to configure site specific archiving of suite files. It is designed to work under rose task-run.

In automatic selection mode, this built-in application will be invoked automatically if a task has a name that starts with rose_arch*.

The application is normally configured in a rose-app.conf. Global settings may be specified in an [arch] section. Each archiving target will have its own [arch:TARGET] section for specific settings, where TARGET would be a URI to the archiving location on your site specific archiving system. Settings in a [arch:TARGET] section would override those in the global [arch] section for the given TARGET.

A target is considered compulsory, i.e. it must have at least one source, unless it is specified with the syntax [arch:(TARGET)]. In which case, TARGET is considered optional. The application will skip an optional target that has no actual source.

The application provides some useful functionalities:

  • Incremental mode. Store the archive target settings, checksums of source files and the return code of archive command. In a retry, it would only redo targets that did not succeed in the previous attempts.
  • Rename of source files.
  • Tar-Gzip or Gzip source files before sending them to the archive.

The following settings are accepted in [arch] and [arch:TARGET] sections:

command-format=FORMAT
Compulsory. A Pythonic printf style format string to construct the archive command. It must contain the placeholders %(sources)s and %(target)s for substitution of the sources and the target respectively.
compress=pax|tar|pax.gz|tar.gz|tgz|gz
Optional. If specified, compress source files to the given scheme before sending them to the archive. If not specified, the compress scheme is automatically determined by the file extension of the target, if it matches one of the allowed values. For the pax|tar scheme, the sources will be placed in a TAR archive before being sent to the target. For the pax.gz|tar.gz|tgz scheme, the sources will be placed in a TAR-GZIP file before being sent to the target. For the gz scheme, each source file will be compressed by GZIP before being sent to the target.
rename-format
Optional. If specified, the source files will be renamed according to the specified format. The format string should be a Pythonic printf style format string. It may contain the placeholder %(cycle)s (for the current $ROSE_TASK_CYCLE_TIME, the placeholder %(name)s for the name of the file, and/or named placeholders that are generated by rename-parser.
rename-parser
Optional. Ignored if rename-format is not specified. Specify a regular expression to parse the name of a source. The regular expression should do named captures of strings from source file names, which can then be used to substitute named placeholders in the corresponding rename-format.
source=NAME
Compulsory for each [arch:TARGET] section. Specify a list of space delimited source file names and/or globs for matching source file names. (File names with space or quote characters can be escaped using quotes or backslashes, like in a shell.) Paths, if not absolute (beginning with a /), are assumed to be relative to $ROSE_SUITE_DIR or to $ROSE_SUITE_DIR/PREFIX if source-prefix=PREFIX is specified. If a name or glob is given in a pair of brackets, e.g. (hello-world.*), the source is considered optional and will not cause a failure if it does not match any source file names. However, a compulsory target that ends up with no matching source file will be considered a failure.
source-edit-format=FORMAT
Optional. A Pythonic printf style format string to construct a command to edit or modify the content of source files before archiving them. It must contain the placeholders %(in)s and %(out)s for substitution of the path to the source file and the path to the modified source file (which will be created in a temporary working directory).
source-prefix=PREFIX
Optional. Add a prefix to each value in a source declaration. A trailing slash should be added for a directory. Paths are assumed to be relative to $ROSE_SUITE_DIR. This setting serves 2 purposes. It provides a way to avoid typing the same thing repeatedly. It also modifies the name-spaces of the sources if the target is in a TAR or TAR-GZIP file. In the absence of this setting, the name of a source in a TAR or TAR-GZIP file is the path relative to $ROSE_SUITE_DIR. By specifying this setting, the source names in a TAR or TAR-GZIP file will be shortened by the prefix.
target-prefix=PREFIX
Optional. Add a prefix to each target declaration. This setting provides a way to avoid typing the same thing repeatedly. A trailing slash (or whatever is relevant for the archiving system) should be added for a directory.
update-check=mtime+size|md5|sha1|...
Optional. Specify the method for checking whether a source has changed since the previous run. If the value is mtime+size, the application will use the modified time and size of the source, which is useful for large files, but is less correct. Otherwise, the value, if specified, should be the name of a hash object in Python's hashlib, such as md5 (default), sha1, etc. In this mode, the application will use the checksum (based on the specified hashing method) of the content of each source file to determine if it has changed or not.

E.g.:

# General settings
[arch]
command-format=foo put %(target)s %(sources)s
source-prefix=$ROSE_DATAC/
target-prefix=foo://hello/

# Archive a file to a file
[arch:world.out]
source=hello/world.out

# Auto gzip
[arch:planet.out.gz]
source=hello/planet.out

# Archive files matched by a glob to a directory
[arch:worlds/]
source=hello/worlds/*

# Archive multiple files matched by globs or names to a directory
[arch:worlds/]
source=hello/worlds/* greeting/worlds/* hi/worlds/*

# As above, but "greeting/worlds/*" may return an empty list
[arch:worlds/]
source=hello/worlds/* (greeting/worlds/*) hi/worlds/*

# Target is optional, implied that sources may all be missing
[arch:(black-box/)]
source=cats.txt dogs.txt

# Auto tar-gzip
[arch:galaxies.tar.gz]
source-prefix=hello/
source=galaxies/*
# File with multiple galaxies may be large, don't do its checksum
update-check=mtime+size

# Force gzip each source file
[arch:stars/]
source=stars/*
compress=gzip

# Source name transformation
[arch:moons.tar.gz]
source=moons/*
rename-format=%(cycle)s-%(name)s
source-edit-format=sed 's/Hello/Greet/g' %(in)s >%(out)s

# Source name transformation with a rename-parser
[arch:unknown/stuff.pax]
rename-format=hello/%(cycle)s-%(name_head)s%(name_tail)s
rename-parser=^(?P<name_head>stuff)ing(?P<name_tail>-.*)$
source=stuffing-*.txt

# ...

On completion, rose_arch writes a status summary for each target to the standard output, which looks like this:

0 foo:///fred/my-su173/output0.tar.gz [compress=tar.gz]
+ foo:///fred/my-su173/output1.tar.gz [compress=tar.gz, t(init)=2012-12-02T20:02:20Z, dt(tran)=5s, dt(arch)=10s, ret-code=0]
+       output1/earth.txt (output1/human.txt)
+       output1/venus.txt (output1/woman.txt)
+       output1/mars.txt (output1/man.txt)
= foo:///fred/my-su173/output2.tar.gz [compress=tar.gz]
! foo:///fred/my-su173/output3.tar.gz [compress=tar.gz]

The 1st column is a status symbol, where:

0
An optional target has no real source, and is skipped
+
A target is added or updated.
=
A target is not updated, as it was previously successfully updated with the same sources.
!
Error updating this target.

If the 1st column and the 2nd column are separated by a space character, the 2nd column is a target. If the 1st column and the 2nd column are separated by a tab character, the 2nd column is a source in the target above.

For a target line, the 3rd column contains the compress scheme, the initial time, the duration taken to transform the sources, the duration taken to run the archive command and the return code of the archive command. For a source line, the 3rd column contains the original name of the source.

Built-in Application:rose_bunch

This built-in application allows running of multiple command variants in parallel under a single job, as defined by the application configuration.

The application is normally configured in the [bunch] and [bunch-args] sections in rose-app.conf.

Each variant of the command is run in the same working directory with its output directed to separate .out and .err files of the form bunch.<name>.out. Should you need separate working directories you should configure your command to create the appropriate subdirectory for working in.

Note that, under load balancing systems such as PBS or Slurm, you will need to set resource requests to reflect the resources required by running multiple commands at once e.g. if one command would require 1GB memory and you have configured your app to run up to 4 commands at once then you will need to request 4GB of memory.

The following [bunch] settings are accepted:

command-format=FORMAT
Compulsory. A Pythonic printf style format string to construct the commands to run. Insert placeholders %(argname)s for substitution of the arguments specified under [bunch-args] to the invoked command. The placeholder %(command-instances)s is reserved for inserting an automatically generated index for the command invocation when using the command-instances setting.
command-instances=N
Optional. Allows the user to specify an integer value for the number of instances of a command they want to run. This generates the values used by the %(command-instances)s value in command-format. Useful for cases where the only difference between invocations would be an index number e.g. ensemble members. Note indexes start at 0.
pool-size=N
Optional. Allows the user to limit the number of concurrently running commands. If not specified then all command variations will be run at the same time.
fail-mode=continue|abort
Optional (default=continue). Specify what action you want the job to take on the failure of a command that it is trying to run. If set to continue all command variants will be run by the job and the job will return a non-zero exit code upon completion e.g. if three commands are to be run and the second one fails, all three will be run and the job will exit with a return code of 1. Alternatively, if fail-mode is set to abort then on failure of any one of the command variants it will stop trying to run any further variants N.B. the job will wait for any already running commands to finish before exiting. Commands that won't be run due to aborting will be reported in the job output with a [SKIP] prefix when running in verbose mode. For example in the case of three command variants with a pool-size of 1 and fail-mode=abort, if the second variant failed then the job would exit with a non-zero error code without having run the third variant.
incremental=true|false
Optional (default=true). If set to true then only failed commands will be re-run on retrying running of the job. If any changes are made to the configuration being run then all variants will be re-run. Similarly, running the app with the --new option to rose task-run will result in all commands being run. In verbose mode the app will report commands that won't be run due to previous successes in the job output with a [PASS] prefix.
names=name1 name2 ...
Optional. Allows defining names for each of the command variants to be run, facilitating identification in logs. If not set then commands will be identified by their index. The number of entries in the names must be the same as the number of entries in each of the args to be used.

The [bunch-args] section is used to specify the various combinations of args to be passed to the command specified under [bunch]command-format=:

argname=val1 val2 ...
Optional. Allows defining named lists of argument values to pass to [bunch]command-format=. Multiple named sets of arguments can be defined. Each argname can be referenced in the using %(argname)s. The only disallowed name is command-instances, which is reserved for the auto-generated list of instances when the [bunch]command-instances=N option is used.

E.g.:

meta=rose_bunch
mode=rose_bunch

[bunch]
command-format=echo arg1: %(arg1)s, arg2: %(arg2)s, command-instance: %(command-instances)s
command-instances = 4
fail-handle = abort
incremental = True
names = foo1 bar2 baz3 qux4
pool-size=2

[bunch-args]
arg1=1 2 3 4
arg2=foo bar baz qux

Built-in Application: rose_prune

This built-in application offers a way to housekeep a cycling suite. It prunes files and directories generated by suite tasks. It is designed to work under rose task-run on the host that runs the suite daemon.

In automatic selection mode, this built-in application will be invoked automatically if a task has a name that starts with rose_prune*.

The application is normally configured in the [prune] section in a rose-app.conf.

All settings are expressed as a space delimited list of cycles, normally as cycle points or offsets relative to the current cycle. For date-time cycles, the format of a cycle point should be an ISO8601 date-time, and an offset should be an ISO8601 duration. E.g. -P1DT6H is 1 day and 6 hours before the current cycle point.

The cycles of some settings also accept an optional argument followed by a colon. In these, the argument should be globs for matching items in the directory. If two or more globs are required, they should be separated by a space. In which case, either the argument should be quoted or the space should be escaped by a backslash.

The following settings are accepted:

cycle-format{key}=format
Specify a key to a format string for use in conjunction with a prune{item-root}=cycle:globs ... setting. For example, we may have something like cycle-format{cycle_year}=CCYY and prune{share}=-P1Y:xmas-present-%(cycle_year)s/. In cylc, if the current cycle point is 20151201T0000Z, it will clear out the directory share/xmas-present-2014/.

The key can be any string that can be used in a %(key)s substitution, and format should be a a valid rose date print format.

prune-remote-logs-at=cycle ...
Re-sync remote job logs at these cycles and remove them from remote hosts.
prune-server-logs-at=cycle ...
Remove logs on the suite server. Removes both log directories and archived logs.
archive-logs-at=cycle ...
Archive all job logs at these cycles. Remove remote job logs on success.
prune{item-root}=cycle[:globs] ...
Remove the sub-directories under item-root (e.g. work/ of the specified cycles. E.g. In cylc, if current cycle is 20141225T1200Z, prune{work}=-PT12H will clear out work/20141225T0000Z/.

If globs are specified for a cycle, it will attempt to prune only items matching CYCLE/GLOBS under item-root. E.g. In cylc, if current cycle is 20141225T1200Z, then prune{share/cycle}=-PT12H:wild* will clear out all items matching share/cycle/20141225T0000Z/wild*.

A glob can also be specified as a formatting string containing a single substitution %(cycle)s. In this mode, the cycle string will not be added as a sub-directory of the item-root. E.g. In cylc, if current cycle is 20141225T1200Z, then prune{share}=-PT12H:hello-*-at-%(cycle)s.txt will clear out all items matching share/hello-*-at-20141225T0000Z.txt.

A glob can also be specified as a formatting string containing a substitution %(key)s, if a cycle-format{key}=format setting is specified. See above for detail.

Deprecated prune-work-at=cycle[:globs] ...
Equivalent to prune{work}=cycle[:globs] ....
Deprecated prune-datac-at=cycle[:globs] ...
Equivalent to prune{share/cycle}=cycle[:globs] ...

E.g.:

meta=rose_prune
mode=rose_prune

[prune]
cycle-format{cycle_year_month}=CCYYMM
prune-remote-logs-at=-PT6H
archive-logs-at=-P1D
prune-server-logs-at=-P7D
prune{work}=-PT6H:task_x* -PT12H:*/other*.dat -PT18H:task_y* -PT24H
prune{share}=-P1D:hello-*-at-%(cycle)s.txt -P3M:monthly/%(cycle_year_month)s/
prune{share/cycle}=-PT6H:foo* -PT12H:'bar* *.baz*' -P1D

rose task-env

There are times when extra environment needs to be defined before launching rose task-run. This is where rose task-env may come in handy. The command prints to the STDOUT the standard Rose task environment variables (which are normally provided by rose task-run) in a syntax compatible to bash / ksh. This means that the output of this command can be shell eval into the current environment. E.g.

eval $(rose task-env)

See Rose Reference Guide: CLI > rose task-env for a full list of environment variables provided by this command.

rose app-run

Run an application according to its configuration, outside of a suite task environment. Although you will normally launch a Rose application using rose task-run, there are situations when you may have a standalone Rose application configuration that you just want to run outside of a suite. This is where rose app-run may come in handy.

See Rose Reference Guide: CLI > rose app-run for a full list of environment variables provided by this command.