Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add details on setting cron timezone for rebalancing schedule #250

Merged
merged 3 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion castai/resource_rebalancing_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ func resourceRebalancingSchedule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotWhiteSpace),
Description: "Cron expression defining when the schedule should trigger.",
Description: "Cron expression defining when the schedule should trigger.\n\n"+
" The `cron` expression can optionally include the `CRON_TZ` variable at the beginning to specify the timezone in which the schedule should be interpreted.\n\n"+
" Example:\n"+
" ```plaintext\n"+
" CRON_TZ=America/New_York 0 12 * * ?\n"+
" ```\n"+
" In the example above, the `CRON_TZ` variable is set to \"America/New_York\" indicating that the cron expression should be interpreted in the Eastern Time (ET) timezone.\n\n"+
" To retrieve a list of available timezone values, you can use the following API endpoint:\n\n"+
" GET https://api.cast.ai/v1/time-zones\n\n"+
" When using the `CRON_TZ` variable, ensure that the specified timezone is valid and supported by checking the list of available timezones from the API endpoint."+
" If the `CRON_TZ` variable is not specified, the cron expression will be interpreted in the UTC timezone.",
},
},
},
Expand Down
14 changes: 14 additions & 0 deletions docs/resources/rebalancing_schedule.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading