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

# Workflow Schedules (Legacy)

> Create, update, and delete cron-based schedules that trigger workflow runs automatically.

> [!NOTE]
>
> This page documents the original routes, which keep working. For new integrations, use the `/v1` routes in [Workflow Schedules](https://docs.sixtyfour.ai/api-reference/workflows/workflow-schedules.md). [Legacy](https://docs.sixtyfour.ai/api-reference/legacy.md) maps each original route to its `/v1` replacement.

> [card] [API Reference](https://docs.sixtyfour.ai/api-reference/workflow-schedules/create-schedule.md)
>
> See the full request/response schema and parameters in the API Reference.

## Schedule definition

A schedule binds a `workflow_id` to a `cron_expression` and `timezone`:

* `workflow_id`: the workflow to run. It must belong to your team.
* `name`: required, up to 200 characters.
* `cron_expression`: standard 5-field cron (`minute hour day month weekday`), up to 1,000 characters.
* `timezone`: IANA timezone, e.g. `America/Los_Angeles`. Defaults to `UTC`.
* `description`: optional free-form text, up to 2,000 characters.
* `is_active`: defaults to `true`. Set to `false` to save a schedule without activating it.

Each scheduled run uses the workflow's last valid saved definition, so edits apply from the next run.

> [!WARNING]
>
> A scheduled run of a workflow that starts with a `webhook` block processes that block's saved sample input every time, and each run is billed. Without a saved sample input, every scheduled run fails. Send new rows with [Run Workflow](https://docs.sixtyfour.ai/api-reference/legacy/workflows-execution.md#run-workflow) instead.

Schedules belong to their team. A schedule pauses, with `disabled_reason` set, when the API key it runs as is revoked or expires, when its team is archived, or when its creator is removed and the admin chooses to pause their schedules.

## Overlapping and missed runs

* Every scheduled time starts a run, even when the schedule's previous run is still going, so runs can overlap. Keep the interval longer than a typical run.
* A run that cannot start at its scheduled time, such as during an outage, starts late if it can start within 1 hour; otherwise it is skipped.
* There is no minimum interval. `* * * * *` starts a run every minute, and each run is billed.

## Create schedule

Create a new schedule for a workflow.

```http theme={null}
POST https://api.sixtyfour.ai/schedules
```

Required body fields: `workflow_id`, `name`, and `cron_expression`. Returns `201` with the schedule, including up to three upcoming `next_run_times`.

### Example request

```json theme={null}
{
  "workflow_id": "WORKFLOW_ID",
  "name": "Daily lead refresh",
  "cron_expression": "0 9 * * *",
  "timezone": "America/New_York",
  "description": "Re-enrich the prospect list every morning"
}
```

### Example response

```json theme={null}
{
  "id": "a1b2c3d4-5e6f-4789-a123-b4c5d6e7f890",
  "workflow_id": "3f8b2c1e-6d4a-4f9b-8e2c-1a5b7c9d0e3f",
  "team_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
  "name": "Daily lead refresh",
  "description": "Re-enrich the prospect list every morning",
  "cron_expression": "0 9 * * *",
  "timezone": "America/New_York",
  "is_active": true,
  "disabled_reason": null,
  "created_by": "f9e8d7c6-b5a4-4321-9876-543210fedcba",
  "api_key_id": null,
  "next_run_times": [
    "2026-07-17T13:00:00Z",
    "2026-07-18T13:00:00Z",
    "2026-07-19T13:00:00Z"
  ],
  "created_at": "2026-07-16T18:00:00Z",
  "updated_at": "2026-07-16T18:00:00Z"
}
```

***

## List schedules

Retrieve your team's schedules.

```http theme={null}
GET https://api.sixtyfour.ai/schedules
```

Optional query parameter: `workflow_id` filters to schedules for a single workflow.

***

## Get schedule

Retrieve a single schedule by ID.

```http theme={null}
GET https://api.sixtyfour.ai/schedules/{schedule_id}
```

***

## Update schedule

Update a schedule's name, cadence, timezone, description, or active state.

```http theme={null}
PATCH https://api.sixtyfour.ai/schedules/{schedule_id}
```

All body fields (`name`, `cron_expression`, `timezone`, `description`, `is_active`) are optional. Only include what you want to change.

> [!NOTE]
>
> Setting `is_active: true` makes the caller, user or API key, the schedule's owner (`created_by`, `api_key_id`) and clears `disabled_reason`. The schedule stays in its team.

### Example request

```json theme={null}
{
  "is_active": false
}
```

***

## Delete schedule

Permanently delete a schedule. Returns `{"success": true, "id": "SCHEDULE_ID"}`.

```http theme={null}
DELETE https://api.sixtyfour.ai/schedules/{schedule_id}
```

> [!NOTE]
>
> Deleting a schedule does not affect the underlying workflow or its run history.

***

## Example usage

```bash cURL theme={null}
curl -X POST "https://api.sixtyfour.ai/schedules" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow_id": "WORKFLOW_ID",
    "name": "Daily lead refresh",
    "cron_expression": "0 9 * * *",
    "timezone": "America/New_York"
  }'
```

```python Python theme={null}
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.sixtyfour.ai"
headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}

response = requests.post(
    f"{BASE_URL}/schedules",
    headers=headers,
    json={
        "workflow_id": "WORKFLOW_ID",
        "name": "Daily lead refresh",
        "cron_expression": "0 9 * * *",
        "timezone": "America/New_York",
    },
)
response.raise_for_status()
schedule = response.json()
next_run = schedule["next_run_times"][0] if schedule["next_run_times"] else "not yet computed"
print(f"Created schedule {schedule['id']}, next run at {next_run}")
```

```javascript JavaScript theme={null}
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://api.sixtyfour.ai";
const headers = { "x-api-key": API_KEY, "Content-Type": "application/json" };

const response = await fetch(`${BASE_URL}/schedules`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    workflow_id: "WORKFLOW_ID",
    name: "Daily lead refresh",
    cron_expression: "0 9 * * *",
    timezone: "America/New_York",
  }),
});
if (!response.ok) {
  throw new Error(`Failed to create schedule: ${await response.text()}`);
}
const schedule = await response.json();
const nextRun = schedule.next_run_times[0] ?? "not yet computed";
console.log(`Created schedule ${schedule.id}, next run at ${nextRun}`);
```

## Pricing

Scheduled runs are billed the same as manual runs. See [Credit Costs](https://docs.sixtyfour.ai/guides/credits-and-pricing.md) for more information.

## Related

* [Batch Processing](https://docs.sixtyfour.ai/guides/batch-processing.md)
* [Async Jobs](https://docs.sixtyfour.ai/api-reference/async-jobs.md)
* [Handling Errors](https://docs.sixtyfour.ai/api-reference/legacy/errors.md)
* [Credit Costs](https://docs.sixtyfour.ai/guides/credits-and-pricing.md)


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