> For the complete documentation index, see [llms.txt](https://docs.reviactyl.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reviactyl.app/client-api/schedule.md).

# Schedule

## GET /servers/{server}/schedules

> Returns all the schedules belonging to a given server

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules":{"get":{"operationId":"schedule.index","summary":"Returns all the schedules belonging to a given server","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## POST /servers/{server}/schedules

> Store a new schedule for a server

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules":{"post":{"operationId":"schedule.store","summary":"Store a new schedule for a server","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/StoreScheduleRequest"},{"type":"object","properties":{"month":{"type":"string"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"schemas":{"StoreScheduleRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":191},"is_active":{"type":"boolean"},"minute":{"type":"string"},"hour":{"type":"string"},"day_of_month":{"type":"string"},"day_of_week":{"type":"string"}},"required":["name","minute","hour","day_of_month","day_of_week"],"title":"StoreScheduleRequest"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## GET /servers/{server}/schedules/{schedule}

> Returns a specific schedule for the server

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules/{schedule}":{"get":{"operationId":"schedule.view","summary":"Returns a specific schedule for the server","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"schedule","in":"path","required":true,"description":"The schedule ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## POST /servers/{server}/schedules/{schedule}

> Updates a given schedule with the new data provided

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules/{schedule}":{"post":{"operationId":"schedule.update","summary":"Updates a given schedule with the new data provided","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"schedule","in":"path","required":true,"description":"The schedule ID","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UpdateScheduleRequest"},{"type":"object","properties":{"month":{"type":"string"}}}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"schemas":{"UpdateScheduleRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":191},"is_active":{"type":"boolean"},"minute":{"type":"string"},"hour":{"type":"string"},"day_of_month":{"type":"string"},"day_of_week":{"type":"string"}},"required":["name","minute","hour","day_of_month","day_of_week"],"title":"UpdateScheduleRequest"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## DELETE /servers/{server}/schedules/{schedule}

> Deletes a schedule and it's associated tasks

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules/{schedule}":{"delete":{"operationId":"schedule.delete","summary":"Deletes a schedule and it's associated tasks","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"schedule","in":"path","required":true,"description":"The schedule ID","schema":{"type":"integer"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## POST /servers/{server}/schedules/{schedule}/execute

> Executes a given schedule immediately rather than waiting on it's normally scheduled time\
> to pass. This does not care about the schedule state

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/schedules/{schedule}/execute":{"post":{"operationId":"schedule.execute","summary":"Executes a given schedule immediately rather than waiting on it's normally scheduled time\nto pass. This does not care about the schedule state","tags":["Schedule"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"schedule","in":"path","required":true,"description":"The schedule ID","schema":{"type":"integer"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"skipped":{"type":"boolean"}},"required":["skipped"]}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.reviactyl.app/client-api/schedule.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
