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

POL-1435 POL-1436 POL-1437 - feat: Schedule Instance PT Enhancements #2918

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions cost/azure/schedule_instance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v6.2.0

- Added retry mechanism in case of failed actions or timeout waiting for the expected status change
- Fixed issue preventing schedules being enforced when first action attempt fails
- Added support for "Schedule Action Tag" to control scheduling behavior

## v6.1.0

- Added email notifications for Start Action, Stop Action, and Errors
Expand Down
21 changes: 18 additions & 3 deletions cost/azure/schedule_instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,26 @@ This policy uses the schedule tag value (default key: schedule) for scheduling t
- `schedule` = `08:15-17:30;MO,TU,WE,TH,FR;America/New_York`
Start at 8:15am and stop at 5:30pm every weekday in US Eastern Time (America/New York)

### Schedule Label Format
### Schedule Tag Format

`<Schedule Label>` = `<Hours>;<Days of the Week>[;<Optional Timezone>]`
The policy uses two optional tags to control scheduling:

The Schedule Label value is a string consisting of 2 or 3 semicolon-separated (`;`) substrings (Hours, Days of the Week, and optional Timezone) with the following format:
1. **Schedule Tag** (Required, Default `schedule`) with format: `HH:mm-HH:mm;DAYS[;Optional TIMEZONE]`
- Example: `08:00-17:30;MO,TU,WE,TH,FR;America/Los_Angeles`
- Time range in 24hr format (HH:mm-HH:mm)
- Days using two letter format (SU,MO,TU,WE,TH,FR,SA)
- Optional timezone (defaults to UTC if not specified)

`<Schedule Tag>` = `<Hours>;<Days of the Week>[;<Optional Timezone>]`

2. **Schedule Action Tag** (Not Required, Default `schedule_action`) to control scheduling behavior:
- `startstop` (default if not specified): Start during window, stop outside window
- `start`: Only start during window, never stop
- `stop`: Only stop during window, never start

`<Schedule Action Tag>` = `startstop|start|stop`

The Schedule Tag value is a string consisting of 2 or 3 semicolon-separated (`;`) substrings (Hours, Days of the Week, and optional Timezone) with the following format:

- *Hours* - Start and stop hours are 24 hour format. For example, a value of `8:15-17:30` will start instances at 8:15 and stop them at 17:30 (5:30 pm). If the minute field is left blank, the minute value of `00` will be assumed.
- *Days of the Week* - Comma-separated list of days indicated by their two-letter abbreviation value from the following list: SU,MO,TU,WE,TH,FR,SA. For example, a value of `MO,TU,WE,TH,FR` will start and stop the instances on weekdays but not on weekends.
Expand Down
Loading
Loading