> Source: https://wexa.ai/docs/automation/update-schedule

# update-schedule

Change a schedule. Only the parameters you pass change, and `status` pauses or resumes it. Needs the `fabric:orchestrate.write` grant.

**Update a schedule**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"update-schedule","arguments":{"schedule_id":"6ab194677566f41b5c28e30f","goal":"Summarise yesterday'\''s orders."}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000189\",\"result\":{\"schedule_id\":\"6ab194677566f41b5c28e30f\",\"goal\":\"Summarise yesterday's orders.\",\"frequency\":\"0 9 * * 1\",\"status\":\"active\",\"run_count\":0}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/update-schedule \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"schedule_id":"6ab194677566f41b5c28e30f","goal":"Summarise yesterday'\''s orders."}'
```

```json
{
  "lifecycle_id": "qlc_000189",
  "result": {
    "schedule_id": "6ab194677566f41b5c28e30f",
    "goal": "Summarise yesterday's orders.",
    "frequency": "0 9 * * 1",
    "status": "active",
    "run_count": 0
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.updateSchedule({
  schedule_id: '6ab194677566f41b5c28e30f',
  goal: 'Summarise yesterday\'s orders.'
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  schedule_id: '6ab194677566f41b5c28e30f',
  goal: 'Summarise yesterday\'s orders.',
  frequency: '0 9 * * 1',
  status: 'active',
  run_count: 0
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.update_schedule(
    schedule_id="6ab194677566f41b5c28e30f",
    goal="Summarise yesterday's orders.",
)
```

```python
# out is the result, already unwrapped
{
    "schedule_id": "6ab194677566f41b5c28e30f",
    "goal": "Summarise yesterday's orders.",
    "frequency": "0 9 * * 1",
    "status": "active",
    "run_count": 0
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `schedule_id` | string | Required | Schedule id from `list-schedules` or `create-schedule`. A schedule in this project. |
| `frequency` | string | Optional | Cron expression "min hour day month weekday". Supply at most one of `frequency` or `run_at`. |
| `goal` | string | Optional | What the agent or process flow should do on each run. |
| `limit` | integer | Optional | Stop after this many runs. Recurring only. |
| `run_at` | integer | Optional | Unix seconds for a single run, which must be in the future. Supply at most one of `frequency` or `run_at`. Refused together with `limit`. |
| `status` | string | Optional | `paused` stops the schedule firing, `active` resumes it with its configuration intact, `inactive` retires it. Any other value is refused. There is no separate pause tool. |
| `table` | object | Optional | Bind to a [Data Table](/docs/data-tables/overview): each firing picks up the next matching row and substitutes it into the goal. Needs `table_id`; the filter shape is under More details. |

**Errors**

- `ValidationError` (422): nothing to change was supplied; pass at least one of `goal`, `frequency`, `run_at`, `limit`, `status` or `table`.
- `ValidationError` (422): `end_at` or `time_zone` was passed. Neither can change after creation: delete the schedule and create it again.

**Show full response**

A real response, captured from a live call to `update-schedule`:

**Result of update-schedule**

**REST API**

```json
{
  "lifecycle_id": "qlc_000189",
  "result": {
    "agentflow_id": "6ab1945e7566f41b5c28e303",
    "conclusion": null,
    "created_at": 1790022759.401271,
    "created_by": "6a79a770b6c128ccc24bfca7",
    "end_at": null,
    "frequency": "0 9 * * 1",
    "goal": "Summarise yesterday's orders.",
    "last_execution_id": null,
    "limit": null,
    "run_at": null,
    "run_count": 0,
    "schedule_id": "6ab194677566f41b5c28e30f",
    "status": "active",
    "time_zone": "Asia/Kolkata",
    "type": "recurring",
    "updated_at": 1790023297.35068
  }
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  agentflow_id: '6ab1945e7566f41b5c28e303',
  conclusion: null,
  created_at: 1790022759.401271,
  created_by: '6a79a770b6c128ccc24bfca7',
  end_at: null,
  frequency: '0 9 * * 1',
  goal: 'Summarise yesterday\'s orders.',
  last_execution_id: null,
  limit: null,
  run_at: null,
  run_count: 0,
  schedule_id: '6ab194677566f41b5c28e30f',
  status: 'active',
  time_zone: 'Asia/Kolkata',
  type: 'recurring',
  updated_at: 1790023297.35068
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000189'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "agentflow_id": "6ab1945e7566f41b5c28e303",
 "conclusion": None,
 "created_at": 1790022759.401271,
 "created_by": "6a79a770b6c128ccc24bfca7",
 "end_at": None,
 "frequency": "0 9 * * 1",
 "goal": "Summarise yesterday's orders.",
 "last_execution_id": None,
 "limit": None,
 "run_at": None,
 "run_count": 0,
 "schedule_id": "6ab194677566f41b5c28e30f",
 "status": "active",
 "time_zone": "Asia/Kolkata",
 "type": "recurring",
 "updated_at": 1790023297.35068
}

out.lifecycle_id  # 'qlc_000189' — an attribute, not a key
```

**More details**

It is a partial update. `end_at` and `time_zone` cannot be changed after creation.

A schedule that has already executed cannot be removed with `delete-schedule`: mark it `inactive` here instead.

**Binding to a table.** The `table` object takes a required `table_id` and an optional `search_filters` list. Each filter is `{column, operator, value, type}`: `column` is a column name or `column_id` as `get-table` reports it, `operator` is one of `eq`, `gt`, `gte`, `in`, `lt`, `lte`, `ne`, `nin`, `value` is an array for `in` and `nin`, and `type` is the column type, e.g. string, number or datetime.

Not marked consequential: it is audited lightly and the project's write gate never holds it, although it changes the schedule.

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
