On this page
JS RUN
Core command
JS RU
JSRU
Runs a saved JavaScript script of the JsScripts folder, with optional arguments.
Syntax
JS RUN <file> [<argument> ...]
Arguments
| Argument | Required | Values | Default |
|---|---|---|---|
<file> | Yes | A file name with its .js extension, a relative path, or a declared @alias | None |
<argument> | No | Words passed to the script as args[0], args[1]... | None |
Examples
JS RUN migrate_active_customers.js;
JS RUN migrate_active_customers.js PROD_ORDERS ARCHIVE_DB;
Details
Finding the script
The name is looked up in the JavaScript scripts folder (JsScripts): a relative path, a declared @alias, or a file name found only once. Give the name with its .js extension: a name without an extension does not find a .js file. A declared @alias matches whatever the extension.
Arguments and warnings
The words after the name are passed to the script as args[0], args[1]... A one-line warning is shown for each @instance or @environment tag that does not match the current connection; the script runs anyway.
Related
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.