create-schedule
Schedule an agent or a process flow to run unattended, and return its schedule_id. Supply exactly one of 'frequency' (a cron expression, repeating) or 'run_at' (unix seconds, once). 'time_zone', 'limit' and 'end_at' bound a recurring schedule only. 'table' binds the schedule to a Data Table so each firing picks up the next matching row. The schedule is attributed to the user whose key was used.
What it is called on each surface
The wire name is create-schedule everywhere: it is what the Wexa MCP server advertises, the REST path is
POST /v1/create-schedule, and each SDK exposes it under its own language's naming convention.
| Surface | Name |
|---|---|
| Wexa MCP server | create-schedule |
| REST API | POST /v1/create-schedule |
| TypeScript SDK | fabric.createSchedule() |
| Python SDK | fabric.create_schedule() |
Arguments
2 of the 8 arguments are required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.
| Argument | Type | Required | Notes |
|---|---|---|---|
agentflow_id | string | Required | Id of the agent or process flow to run — the same id run-agent and run-process-flow take. For an agent from list-agents, use the part before the dot. |
end_at | integer | Optional | Unix seconds after which a recurring schedule stops firing. Recurring only. |
frequency | string | Optional | Cron expression "min hour day month weekday". Mutually exclusive with run_at. |
goal | string | Required | What the agent 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. Mutually exclusive with frequency. |
table | object | Optional | Bind this schedule to a Data Table: each firing picks up the next row matching the filter and substitutes it into the goal. |
time_zone | string | Optional | IANA zone the cron's wall-clock time was written in, e.g. Asia/Kolkata. Recurring only. |
project_id, projectID, organization_id and executed_by are not arguments you pass: the
platform binds all four from the credential you authenticated with, and both SDKs refuse them
before the request leaves your process — see
server-bound arguments.
What it returns
The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.
A real response, captured from a live call to create-schedule:
{
"content": [
{
"type": "text",
"text": "{\"lifecycle_id\":\"qlc_000211\",\"result\":{\"agentflow_id\":\"6ab1945e7566f41b5c28e303\",\"conclusion\":null,\"created_at\":1790023297.717658,\"created_by\":\"6a79a770b6c128ccc24bfca7\",\"end_at\":null,\"frequency\":\"0 9 * * 1\",\"goal\":\"Created to capture delete-schedule, then deleted.\",\"last_execution_id\":null,\"limit\":null,\"run_at\":null,\"run_count\":0,\"schedule_id\":\"6ab196817566f41b5c28e341\",\"status\":\"active\",\"time_zone\":null,\"type\":\"recurring\",\"updated_at\":null}}"
}
],
"isError": false
}Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.
Calling it
The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.
The ids in this example are real, and resolve against the project the documentation is written
against. Swap them for your own. A value in angle brackets is one only you can supply, and the
platform refuses a literal <...>.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create-schedule",
"arguments": {
"agentflow_id": "6ab1945e7566f41b5c28e303",
"goal": "<goal>",
"table": {}
}
}
}Errors
Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its
HTTP status second. create-schedule checks the fabric:orchestrate.write grant, and reaches the seven classes every
tool reaches — listed under the common set. These are the ones specific to it:
| Error | Status | Raised when |
|---|---|---|
NotFound | 404 | agentflow_id matches no agent or process flow. A compound agent id must be split first — see identifiers. |
ApprovalRequired | 202 | A policy held this call for a person to approve. The error carries the approval id; see below. |
ConfigurationError | 5xx | create-schedule is not available to you. Retrying will not help. |
Governance
Every call to create-schedule runs through the same ten-stage lifecycle as every other Wexa tool: the
credential is resolved to a scope, the fabric:orchestrate.write grant is checked, quota is drawn down, the arguments are
validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit
record is written. The lifecycle_id in the response is the handle to that record.
create-schedule is marked consequential, which means it changes something rather than only reading. Two things
follow. It is audited in full rather than lightly, and a policy rule may hold it for human approval — in which
case the call returns 202 and an ApprovalRequired error carrying the approval id, and the SDKs can wait for
the decision and resume rather than making you call again.