---
title: "Pause a scheduled trigger"
method: GET
path: "/triggers/{trigger-name}/pause"
tags: ["Triggers"]
---

# Pause a scheduled trigger

`GET /triggers/{trigger-name}/pause`

Pauses an _alive_ trigger. A can be `paused` if it's in `scheduled` state. A `paused` trigger has a schedule but is currently paused. When time is due for it to run, it will not create the run but will account for the skipped run as if it was executed (remaining is reduced if schedule has limit)

## Response `200`

OK

- Trigger — Defines a scheduled or on-demand trigger.
  - `name` string — A human-readable name to identify the trigger. The server generates a name if this is not supplied. This has to be unique within a project.
  - `description` string — A human-readable description of the trigger. This can be helpful to identify the purpose of the trigger.
  - `created_at` string, date-time — RFC3339 Datetime when this trigger was created
  - `updated_at` string, date-time — RFC3339 datetime when this trigger was updated
  - `action` WebhookTarget, required
    - `url` string, uri, required — The URL of the webhook end point that cronback will send the request to when the trigger runs. The URL **must** be publicly accessible. Cronback will reject URLs that resolve to IP addresses within [Private Networks](https://en.wikipedia.org/wiki/Private_network).
    - `http_method` 'GET' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'POST' — Defines the [HTTP request method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) that cronback will use to invoke the webhook.
    - `timeout_s` number, double — The number of seconds (use fractions for millis) to wait before considering the webhook attempt as `failed`. This timeout is inclusive of DNS resolution, network, and any other latency incurred during the call.
    - `type` 'webhook' — An optional string to indicate the type of action. The only supported type is `webhook` at the moment.
    - `retry` union
      - SimplyRetry — You can choose between a simple retry policy (every X seconds) or an exponential backoff retry policy. Setting `retry: null` (default) means that no retries will take place, if a request to the webhook target fails, the run will immediately be marked as `failed`. Note that runs can run concurrently, new runs will still get created according to schedule even if one of more existing runs are still retrying (in `attempting` state).
        - `max_num_attempts` integer — The maximum number of attempts before giving up
        - `delay_s` number, float — The delay in seconds between every attempt
        - `type` string, required
      - ExponentialBackoffRetry — You can choose between a simple retry policy (every X seconds) or an exponential backoff retry policy. Setting `retry: null` (default) means that no retries will take place, if a request to the webhook target fails, the run will immediately be marked as `failed`. Note that runs can run concurrently, new runs will still get created according to schedule even if one of more existing runs are still retrying (in `attempting` state).
        - `max_num_attempts` integer, required — The maximum number of attempts before giving upon that particular run.
        - `delay_s` number, double, required — The initial delay in seconds between attempts. This value is doubled on every subsequent attempt
        - `max_delay_s` number, double, required — The upper cap for the delay. Delays are doubled on each attempt until it reaches `max_delay_s`
        - `type` string, required
  - `payload` Payload — Details of the payload that will be sent out by cronback when a trigger is run.
    - `body` string — The body of the payload is sent as is when a trigger is run
    - `content_type` string — Sets the `Content-Type` header for the webhook request.
    - `headers` object — Additional headers that will be sent when the trigger runs.
  - `schedule` union
    - Cron — A cron-like pattern to setup a recurring trigger
      - `cron` string, required — A cron-like string to specify when the trigger will run. The cron pattern supports per-second granularity. The full cron pattern supports up to 7 fields in this order: `sec min hour day-of-month month day-of-week year` The first 6 are mandatory with support for sort hand syntax like `@hourly`, `@daily`, `@weekly`, `@monthly`, `@yearly`. For instance, if you want to run the trigger evern 30 seconds, use this pattern `*/30 * * * * *`. For a trigger every minute, use this pattern `0 * * * * *`.
      - `timezone` string, nullable — A valid [IANA TZ Identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to qualify the cron pattern with
      - `limit` integer, nullable — The maximum number of runs. The trigger's status will transition to `expired` automatically when no more runs are left. Note that the limit does not affect manual runs via the API.
      - `remaining` integer, nullable — If limit is set, this will be set by the server to indicate how many future runs this trigger still has before expiring.
      - `type` 'recurring', required
    - RunAt — Defines a trigger that will run at discrete time points
      - `timepoints` string[], required — RFC3339 datetime time points values indicating the absolute times the trigger need to run.
      - `remaining` integer — Set by the server to show how many time points left before this trigger is marked as `expired`
      - `type` 'timepoints', required
  - `status` 'scheduled' | 'on_demand' | 'paused' | 'expired' | 'cancelled' — Status of the trigger. - `scheduled` trigger will run according to their `trigger.schedule` - `on_demand` trigger is not configured to run on a schedule, it can only run manually. - `paused` trigger has a schedule but is currently paused. When time is due for it to run, it will not create the run but will account for the skipped run as if it was executed (remaining is reduced if schedule has limit) - `expired` triggers are scheduled triggers that exhausted their runs or have no future timepoints. - `cancelled` triggers cannot be rund. Those have been cancelled manually via the `/triggers/{trigger-name}/cancel` API.
  - `last_ran_at` string, date-time — RFC3339 datetime of the latest run of this trigger.
  - `estimated_future_runs` string[] — The list of estimated future run timestamps of this trigger (clipped at 5 points _or_ the number of remaining runs, whichever smaller).

## Other responses

- `404` — An error has occurred. The error body contains information about what went wrong.

## Changes

> 18 revisions in range; 1 could not be searched.

- **2023-07-14** (v1) `4bd8baba5434` — 1 info
  - added the optional property `estimated_future_runs` to the response with the `200` status
- **2023-07-14** (v1) `04b283072358` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/devtari-io/apis/cronback-me-api/changes/triggers/:trigger-name/pause/get.md)

---

[API](https://skmtc.dev/devtari-io/apis/cronback-me-api.md) · [All operations](https://skmtc.dev/devtari-io/apis/cronback-me-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/devtari-io/cronback-me-api/revisions/4bd8baba5434/schema)
