NextGen Knowledge Center

Using Non-interactive Scripting

The CLI supports a -s option where you can pass in a script file containing multiple commands. This can be used to programmatically call the CLI from a scheduled job or anywhere else.

From a terminal / shell:

  • In a terminal / shell, run the mccommand executable script, with the following options:
    • mccommand -a https://localhost:8443 -u user -p pass -s script.txt
  • Change the address, username, and password as necessary

You can also add script=script.txt to the "conf/mirth-cli-config.properties" file, so that it will automatically be used any time the CLI is executed.