Cron Platform
Guides

Executions

Understand how TrigRun runs your jobs, handles retries, and stores execution results.

An execution is one logical run of a job. Each execution tracks the scheduled time, delivery attempts, and final outcome.

Execution lifecycle

Job schedule fires

Execution created (status: queued)

Worker picks up execution (status: running)

HTTP request made to target URL

┌─── Success (2xx or configured success_statuses)
│        → status: succeeded

└─── Failure (timeout, connection error, non-success status)
         → Retry with exponential backoff
         → After max_attempts exhausted → status: failed

Execution statuses

StatusMeaning
queuedWaiting to be picked up
runningHTTP request in flight
succeededTarget returned a success status code
failedAll attempts exhausted without success

Retry behavior

When an attempt fails, TrigRun retries based on the job's retry policy:

  • Backoff: 250ms * 2^attempt (exponential with jitter)
  • Default max_attempts: 3 (including the first attempt)
  • Default retry_on_statuses: 429, 500, 502, 503, 504
  • Timeouts and connection errors always trigger a retry

You configure retry behavior per job:

{
  "retry_policy": {
    "max_attempts": 5,
    "retry_on_statuses": [429, 500, 502, 503, 504]
  }
}

Attempts

Each attempt within an execution records:

FieldDescription
numberAttempt number (1, 2, 3...)
statusSUCCESS, TIMEOUT, CONNECTION_ERROR, HTTP_ERROR
statusCodeHTTP status code (if the request completed)
latencyMsRound-trip time in milliseconds
bodyPreviewTruncated response body (up to 64 KB)
responseHeadersSelected response headers
errorClassError category for failed attempts

Outbound headers

TrigRun adds headers to every outbound request for tracing and idempotency:

HeaderValue
X-Cron-Service-Job-IdThe job ID
X-Cron-Service-Execution-IdThe execution ID
X-Cron-Service-Scheduled-ForISO 8601 timestamp of the scheduled run time
X-Cron-Service-AttemptAttempt number (1, 2, 3...)

Use these to deduplicate requests on your end or correlate logs.

Viewing executions

All executions in the workspace:

curl "https://api.trigrun.com/v1/executions" \
  -H "Authorization: Bearer $TOKEN"

Executions for a specific job:

curl "https://api.trigrun.com/v1/jobs/JOB_ID/executions" \
  -H "Authorization: Bearer $TOKEN"

Filter and paginate:

curl "https://api.trigrun.com/v1/executions?status=failed&from=2026-03-01T00:00:00Z&sort=scheduled_for&order=desc&limit=10" \
  -H "Authorization: Bearer $TOKEN"

Query parameters:

ParameterTypeDescription
statusstringFilter: queued, running, succeeded, failed
fromdatetimeStart of time range (ISO 8601)
todatetimeEnd of time range (ISO 8601)
job_namestringSearch by job name (case-insensitive, partial match)
sortstringSort by: scheduled_for or created_at
orderstringasc or desc (default: desc)
limitintegerMax results, 1–100 (default: 50)
offsetintegerSkip N results for pagination

Execution details

Get a single execution with all attempts:

curl "https://api.trigrun.com/v1/executions/EXECUTION_ID" \
  -H "Authorization: Bearer $TOKEN"
{
  "id": "clx...",
  "job_id": "clx...",
  "job_name": "health-check",
  "status": "succeeded",
  "scheduled_for": "2026-03-15T10:00:00.000Z",
  "source": "schedule",
  "attempts": [
    {
      "number": 1,
      "status": "HTTP_ERROR",
      "statusCode": 503,
      "latencyMs": 89
    },
    {
      "number": 2,
      "status": "SUCCESS",
      "statusCode": 200,
      "latencyMs": 142,
      "bodyPreview": "{\"ok\":true}"
    }
  ],
  "final_response": {
    "statusCode": 200,
    "bodyPreview": "{\"ok\":true}"
  }
}

Replaying an execution

Re-run a failed (or any) execution:

curl -X POST "https://api.trigrun.com/v1/executions/EXECUTION_ID/replay" \
  -H "Authorization: Bearer $TOKEN"

This creates a new execution with source: "replay", scheduled for now. The original execution is unchanged.

Execution sources

SourceMeaning
scheduleTriggered by the job's schedule
manualTriggered by "run now"
replayTriggered by replaying a previous execution

CLI reference

cronctl executions list                      # All executions
cronctl executions list --job JOB_ID         # For a specific job
cronctl executions get EXECUTION_ID          # Execution details
cronctl executions replay EXECUTION_ID       # Replay

On this page