Cron Executions
Track execution history, view logs, and retry failed cron job executions.
Base URL
https://api.hookwatch.dev/v1/cron-executionsThe Execution Object
Properties
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the execution |
job_id | string | ID of the cron job that was executed |
job_name | string | Name of the cron job |
status | string | Execution status: pending, running, success, failed, timeout, canceled |
exit_code | number | null | Exit code (0 = success, non-zero = error) |
duration_ms | number | Execution duration in milliseconds |
triggered_by | string | How the execution was triggered: scheduled, manual, retry |
output | string | Standard output from the execution |
error | string | null | Error message if the execution failed |
started_at | string | ISO 8601 timestamp when execution started |
completed_at | string | null | ISO 8601 timestamp when execution completed |
Execution Statuses
pendingWaiting for a CLI agent to pick up and execute
runningExecution is currently in progress on a CLI agent
successCompleted with exit code 0
failedCompleted with non-zero exit code
timeoutExceeded configured timeout
canceledManually canceled before completion
List Executions
Retrieve execution history with optional filtering.
GET /v1/cron-executionsQuery Parameters
| Field | Type | Description |
|---|---|---|
job_id | string | Filter by cron job ID |
status | string | Filter by status (pending, running, success, failed, timeout, canceled) |
triggered_by | string | Filter by trigger type (scheduled, manual, retry) |
from | string | Filter executions after this ISO 8601 timestamp |
to | string | Filter executions before this ISO 8601 timestamp |
limit | number | Maximum executions to return (default: 50, max: 100) |
offset | number | Number of executions to skip for pagination |
Example
Response
Get Execution
Retrieve a specific execution by ID, including full output and error logs.
GET /v1/cron-executions/:idFull Logs
The list endpoint returns truncated output. Use the get endpoint to retrieve the full execution output and error logs.
Retry Execution
Retry a failed execution. Creates a new execution with the same job configuration.
POST /v1/cron-executions/:id/retryResponse
Only Failed Executions
You can only retry executions with status failed or timeout.
Retrying creates a new execution entry.
Error Codes
| Status | Error | Description |
|---|---|---|
400 | Bad Request | Invalid query parameters |
401 | Unauthorized | Invalid or missing access token |
404 | Not Found | Execution not found |
409 | Conflict | Cannot retry (execution not failed) |