Skip to content

script

script is a built-in function. It runs a script file, with optional arguments.

Parameter Required Default Meaning
path yes Path to the script
args no empty Arguments passed after the path

Run a script with arguments

Nightly report button
- name: Nightly report
  type: button
  function: script
  path: "/usr/local/bin/report.sh"
  args: "--today"

This runs /usr/local/bin/report.sh --today. If you leave args out, it runs just /usr/local/bin/report.sh.

The script must be executable

The path is run directly, so the file needs the execute bit:

Make the script executable once

Allow the file to run
chmod +x /usr/local/bin/report.sh

If you cannot change the file, run it through an interpreter instead. The echo-script example in the release pack does exactly that by calling bash first.