createSchedule
Add a schedule for a skill
Add a schedule that runs a skill at set times in a time zone. One skill can have several schedules: add one per time. Before you call it, tell the person the name, the skill, when it runs in words and the time zone, and get their agreement. The schedule is shared by the whole organisation.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
name | string | required | The schedule name: lowercase letters, digits and hyphens, for example coaching-posts-mon-6pm. |
skill | string | required | The skill to run, by its name as in the Skill Library, for example weekly-report. |
when | string | required | When it runs, as a five-part cron expression read in the schedule time zone: minute hour day-of-month month day-of-week. 0 18 * * 4 is Thursdays at 18:00; 0 9 * * 1-5 is weekdays at 09:00. |
timezone | string | optional | IANA time zone, for example Europe/London or UTC. The schedule follows summer time in that zone. |
enabled | boolean | optional | false adds it switched off. |
timeoutMinutes | integer | optional | Time limit for one run, in minutes. Leave it out to use the limit in the skill itself (else 5). |
Scopes
schedules:manage
Annotations
- Read only: no
- Destructive: no
When to use
Call createSchedule when a person asks for a skill to run at set times, for example "run the client digest every Thursday at 6pm London time".
The schedule tools need the schedules:manage scope. Only admin and staff can hold it. Schedules belong to the whole organisation: every admin and staff user sees and changes the same list, which also shows in the Sasha web interface, in Menu → Tasks.
Before you call it, say the schedule in plain words and get the person's agreement: the name, the skill, when it runs and the time zone.
The arguments:
name(required): lowercase letters, digits and hyphens, up to 64 characters, unique on this Sasha. A name that says the time helps, for exampleclient-digest-thu-6pm.skill(required): the skill's name, as in the Skill Library.when(required): a five-part cron expression read intimezone.0 18 * * 4is Thursdays at 18:00,0 9 * * 1-5is weekdays at 09:00 and30 7 1 * *is the first of the month at 07:30.timezone(defaultUTC): an IANA time zone. The schedule follows summer time in that zone, so0 18 * * 4withEurope/Londonis 18:00 London time all year.enabled(defaulttrue):falseadds the schedule paused.timeoutMinutes(1 to 60): the time limit for one run. Left out, the limit in the skill itself applies, or 5 minutes when the skill sets none.
To run one skill at several times, add one schedule for each time. The result is the new schedule, with the fields that listSchedules returns.
Example
{ "name": "client-digest-thu-6pm", "skill": "weekly-client-digest", "when": "0 18 * * 4", "timezone": "Europe/London" }
The structured result (structuredContent):
{
"name": "client-digest-thu-6pm",
"skill": "weekly-client-digest",
"when": "0 18 * * 4",
"timezone": "Europe/London",
"enabled": true,
"timeoutMinutes": 15,
"nextRunAt": "2026-10-22T17:00:00.000Z",
"lastRunAt": null,
"lastStatus": null,
"lastError": null
}
Refusals and what to do
A schedule tool refuses with an error result. Its text is Error in createSchedule: <code>: <reason>.
schedule_exists: a schedule with this name exists. Pick another name, or change that schedule withupdateSchedule.skill_not_found: no skill has this name. Check the name in the Skill Library, or ask the person.unknown_time_zone: the time zone is not an IANA name. Use a name such asEurope/London,America/New_YorkorUTC.invalid_schedule:whendoes not have five parts, or is not a valid cron expression.- If the connection does not hold
schedules:manage, the tool is not in your tool list, and a call to it returnsMCP error -32602: Tool createSchedule not found. Only admin and staff can hold the scope, so a member's connection never has the schedule tools. A connection approved before the scope existed must reconnect, or the person mints a new token. Read thepermissionssection ofgetDocs. - Arguments that do not match the schema are refused before the tool runs, for example a
namewith capital letters or spaces, or an extra argument. internal:unexpected (request <id>): something failed inside Sasha. Quote the request id insuggestImprovement.
Related
listScheduleslists the schedules and their last result.createScheduleadds a schedule.updateSchedulechanges, pauses or restarts a schedule.deleteScheduleremoves a schedule.runScheduleruns a schedule once now.getDocshas aschedulessection with the same rules.