Cron Jobs API
The A1Base Cron Jobs API allows you to programmatically create, manage, and monitor scheduled tasks for your AI agents.Authentication
All API requests require authentication using your A1Base API key. Include your API key in the Authorization header:Base URL
Endpoints
Create a Cron Job
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
endpoint_url | string | Yes | The URL to be called when the cron job executes |
frequency | string | Yes | Frequency of execution (daily, weekly, monthly, custom) |
time | string | Yes | Time of execution in 24-hour format (HH:MM) |
timezone | string | Yes | Timezone for the execution time (e.g., America/Los_Angeles) |
method | string | Yes | HTTP method to use (GET, POST, PUT, DELETE) |
headers | object | No | HTTP headers to include with the request |
body | object | No | Request body for POST/PUT methods |
day_of_week | integer | No | Day of week for weekly jobs (0-6, where 0 is Sunday) |
day_of_month | integer | No | Day of month for monthly jobs (1-31) |
custom_schedule | string | No | Cron expression for custom schedules |
Example Request
Example Response
List All Cron Jobs
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
status | string | No | Filter by status (active, paused) |
limit | integer | No | Maximum number of records to return (default: 20, max: 100) |
offset | integer | No | Number of records to skip (for pagination) |
Example Response
Get a Cron Job
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Example Response
Update a Cron Job
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Request Body
Include only the fields you want to update.Example Request
Example Response
Pause a Cron Job
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Example Response
Resume a Cron Job
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Example Response
Delete a Cron Job
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Example Response
Get Execution History
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The ID of the cron job |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
status | string | No | Filter by execution status (success, failed) |
limit | integer | No | Maximum number of records to return (default: 20, max: 100) |
offset | integer | No | Number of records to skip (for pagination) |
Example Response
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Authentication failed |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource does not exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |