tasks trigger
Triggers a task and prints the run ID and its dashboard URL. It runs in thedev environment unless you pass --env, so start the dev command first.
--wait to wait for the run to finish. It prints the run’s output, or its error and exits with code 1 if the run failed, which makes it useful in scripts and for coding agents testing a task:
dev, it warns you when the dev command isn’t running, because the run waits in the queue until it starts.
The payload as JSON, e.g.
--payload '{"name":"Ada"}'. Without it, the task gets no payload.If a run with this key already exists, return it instead of creating a new one. See idempotency.
The machine to run on, e.g.
small-2x. See machines. Has no effect in dev.Options
The branch to use. Required with
--env preview. In dev, it defaults to the same dev branch as the dev command.Common options
These options are available on most commands.The login profile to use. Defaults to the current profile, which is set by your last
login or switch (initially “default”).Override the default API URL. If not specified, it uses
https://api.trigger.dev. This can also be set via the TRIGGER_API_URL environment variable.The CLI log level to use. Options are
debug, info, log, warn, error, and none. This does not affect the log level of your trigger.dev tasks. Defaults to log.Opt-out of sending telemetry data. This can also be done via the
TRIGGER_TELEMETRY_DISABLED environment variable. Just set it to anything other than an empty string.
