﻿Parameters are inputs you fill in each time you start a task by hand: which
customer to export, which date to start from, whether this is a dry run. You
declare them on the task with [`params`](/configuration/tasks/#params), and the
Web UI, TUI, CLI, and REST API all show a form for them.

```toml title="runwisp.toml"
[tasks.export-org-data]
run = "/usr/local/bin/export.sh"
params = [
  { env    = "ORG_ID", required = true },
  { arg    = "format", choices = ["json", "csv"], default = "json" },
  { option = "--region", choices = ["us", "eu"] },
  { flag   = "--include-attachments" },
]
```

_Screenshot: Run Task modal for export-org-data: a form of text fields, dropdowns, a number input, and a toggle, one control per declared parameter, each with help text underneath._

Each entry passes its value in one way: as an environment variable ([`env`](/configuration/tasks/#env)), a
positional argument (`arg`), an `--option value` pair (`option`), or an on/off
flag (`flag`). Entries can also have a default, a list of choices, a type, and
help text. The [`params`](/configuration/tasks/#params) reference lists every
key and rule.

Parameters are only declared in `runwisp.toml`. The Web UI, TUI, and API can
fill in values, but can't add parameters or change the command.

## Supplying values

- **Web UI:** click **Run…** on the task's page to open the form above. See the
  [Web UI tour](/getting-started/web-ui-tour/#task-detail-tasksid).
- **TUI:** select the task and press **Run Now**. The same fields appear in the
  terminal.
- **CLI:** pass `--param key=value` once per parameter. See
  [`runwisp run`](/reference/cli/#runwisp-run).

    ```bash
    runwisp run export-org-data --param ORG_ID=acme --param format=csv
    ```

- **REST API:** send a [`params`](/configuration/tasks/#params) object with the trigger request. See
  [Remote triggers](/recipes/remote-trigger/).

Each run records the values it actually got, with defaults filled in and
cleared fields left out. You see them on the run's detail view.

## Scheduled runs use the defaults

Nobody fills in a form for a scheduled run. Runs started by
[`cron`](/configuration/tasks/#cron),
[`run_on_start`](/configuration/tasks/#run_on_start), or
[catch-up](/concepts/scheduling/#catching-up-after-downtime) use each parameter's
`default`. A [retry](/concepts/retries/) uses exactly the values of the run it
retries.

This is why a `required` parameter on a task with `cron` must also have a
`default`; otherwise the config is rejected. If a task runs both on a schedule
and by hand, give every parameter a sensible default. The manual form starts
with those values, so you only change what you need.

## Values are never run as shell

Every value reaches your command as a real argument or environment variable. It
is never pasted into the shell string, so typing `; rm -rf /` into a field
passes that text as a harmless argument. The command itself ([`run`](/configuration/tasks/#run)) always
comes from `runwisp.toml`.
