> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# api.triggerJob()

> Public low-code contract, signatures and examples for api.triggerJob.

## `api.triggerJob()`

Schedules an active job template by its exact ID or exact unique name.

Notes:

* Unavailable with `readOnly: true` (throws an error).
* Convenience wrapper for `api.triggerTarget('JOB_TEMPLATE', templateIdOrName, ...)`.
* The input argument is copied directly into the target job's flat
  `api.input().templateInputs`, shallow-spread over template defaults.
  Non-colliding defaults remain and matching keys are overwritten; it is not
  nested under `templateInputs.input` or exposed at top level.
* Pass `&#123; scheduleFor &#125;`; the maximum horizon is 30 days.
* Retired positional date and relative-delay arguments are ignored.

### Signature

```ts theme={null}
static triggerJob(
      templateIdOrName: string,
      templateInputs?: Record<string, JsonValue>,
      options?: AutomationScheduleOptions,
    ): Promise<string>;
```

### Example

```ts theme={null}
const jobId = await api.triggerJob(
  templateId,
  { customerId: 'c-1' },
  { scheduleFor: new Date(Date.now() + 15 * 60 * 1000) },
);
```

See [all api methods](https://docs.revoengine.com/low-code/reference/api.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.