chore(codersdk): explain format of codersdk.UpdateWorkspaceAutostartRequest.Schedule (#12539)

This commit is contained in:
Cian Johnston 2024-03-11 22:50:38 +00:00 committed by GitHub
parent a546cb8b32
commit d704ff4570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

1
coderd/apidoc/docs.go generated
View File

@ -12573,6 +12573,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"schedule": {
"description": "Schedule is expected to be of the form ` + "`" + `CRON_TZ=\u003cIANA Timezone\u003e \u003cmin\u003e \u003chour\u003e * * \u003cdow\u003e` + "`" + `\nExample: ` + "`" + `CRON_TZ=US/Central 30 9 * * 1-5` + "`" + ` represents 0930 in the timezone US/Central\non weekdays (Mon-Fri). ` + "`" + `CRON_TZ` + "`" + ` defaults to UTC if not present.",
"type": "string"
}
}

View File

@ -11396,6 +11396,7 @@
"type": "object",
"properties": {
"schedule": {
"description": "Schedule is expected to be of the form `CRON_TZ=\u003cIANA Timezone\u003e \u003cmin\u003e \u003chour\u003e * * \u003cdow\u003e`\nExample: `CRON_TZ=US/Central 30 9 * * 1-5` represents 0930 in the timezone US/Central\non weekdays (Mon-Fri). `CRON_TZ` defaults to UTC if not present.",
"type": "string"
}
}

View File

@ -253,6 +253,9 @@ func (c *Client) UpdateWorkspace(ctx context.Context, id uuid.UUID, req UpdateWo
// UpdateWorkspaceAutostartRequest is a request to update a workspace's autostart schedule.
type UpdateWorkspaceAutostartRequest struct {
// Schedule is expected to be of the form `CRON_TZ=<IANA Timezone> <min> <hour> * * <dow>`
// Example: `CRON_TZ=US/Central 30 9 * * 1-5` represents 0930 in the timezone US/Central
// on weekdays (Mon-Fri). `CRON_TZ` defaults to UTC if not present.
Schedule *string `json:"schedule"`
}

6
docs/api/schemas.md generated
View File

@ -6547,9 +6547,9 @@ If the schedule is empty, the user will be updated to use the default schedule.|
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------- | ------ | -------- | ------------ | ----------- |
| `schedule` | string | false | | |
| Name | Type | Required | Restrictions | Description |
| ---------- | ------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `schedule` | string | false | | Schedule is expected to be of the form `CRON_TZ=<IANA Timezone> <min> <hour> * * <dow>` Example: `CRON_TZ=US/Central 30 9 * * 1-5` represents 0930 in the timezone US/Central on weekdays (Mon-Fri). `CRON_TZ` defaults to UTC if not present. |
## codersdk.UpdateWorkspaceDormancy