murex Shell Docs

Command Reference: runmode

Alter the scheduler’s behaviour at higher scoping level


Due to dynamic nature in which blocks are compiled on demand, traditional try and trypipe blocks cannot affect the runtime behaviour of schedulers already invoked (eg for function blocks and modules which try et al would sit inside). To solve this we need an additional command that is executed by the compiler prior to the block being executed which can define the runmode of the scheduler. This is the purpose of runmode.

The caveat of being a compiler command rather than a builtin is that runmode needs be the first command in a block.


runmode try|trypipe function|module


function hello {
    # Short conversation, exit on error
    runmode: try function

    read: name "What is your name? "
    out: "Hello $name, pleased to meet you"
    read: mood "How are you feeling? "
    out: "I'm feeling $mood too"


runmode’s parameters are ordered:

1st parameter


Checks only the last command in the pipeline for errors. However still allows commands in a pipeline to run in parallel.


Checks every command in the pipeline before executing the next. However this blocks pipelines from running every command in parallel.

2nd parameter


Sets the runmode for all blocks within the function when runmode is placed at the start of the function. This includes privates, autocompletes, events, etc.


Sets the runmode for all blocks within that module when placed at the start of the module. This include any functions, privates, autocompletes, events, etc that are inside that module. The do not need a separate runmode ... function if runmode ... module is set.

See Also

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Thu Oct 13 08:08:18 UTC 2022 against commit ed6b6fced6b6fc609f4be93c5d3348695a762facfecf48f.

Current version is 2.11.2200 which has been verified against 16798 tests cases.