MaintenanceWindow - updateWindowWithMonthlySchedule
This command updates an existing Maintenance Window to have a monthly schedule, with support for all schedule choices (specific day of a particular week of every month, particular day of every month or last day of every month).
There are three types of monthly schedules that are supported. The command requires specifying one of the types listed below.
- Specific day of every month=0
- Specific day of a week of every month=1
- Last day of every month=2
The dateString argument defines a monthly schedule to be added to the window. It must be in the format YYYY-MM-DD HH:MM:SS.
Use the dayOfWeekOrMonth argument to specify the day when the window is active. For last day of month schedule (scheduleType=2) this argument gets ignored and you may specify -1 as its value. For specific day of month schedule (scheduleType=0), this specifies actual calendar day (1-31) and for specific day of a week schedule (scheduleType=1) it provides the actual day of the week based on the following scheme.
Use the weekOfMonth argument for specific day of a week schedule (scheduleType=1), to select the week in which the window will be active. Set value to -1 to set the window to be active in last week of every month. Please note any value entered gets ignored for all other type of schedules (scheduleType=0 or scheduleType=2).
Command Input :
Name of Maintenance Window to be updated
|scheduleType||Integer||Type of monthly schedule. Valid types are listed above.|
|dateString||String||Monthly schedule to be added. The date string must be in the format YYYY-MM-DD HH:MM:SS.|
Day of the week or month to activate the window depending on the type of schedule. Refer command description for more details as values differ based on the type.
Specific week of the month activate the window. Only applicable for day of week schedule and any provided value will be ignored for other types.
|windowDurationDays||String||Duration, number of days|
|windowDurationHours||String||Duration, number of hours|
|windowDurationMinutes||String||Duration, number of minutes|
The following example shows how to update a maintenance window to have a monthly schedule. The windows is active at 11:35 PM on the second Tuesday of every month with a duration of 5 hours and 35 minutes
MAINTENANCE_WINDOW_NAME="MONTHLY_WINDOW" SCHEDULE_TYPE=1 DATE_STRING="2005-01-01 23:35:00" DAY_OF_WEEK=4 WEEK_OF_MONTH=2 WINDOW_KEY=`blcli MaintenanceWindow updateWindowWithMonthlySchedule "$MAINTENANCE_WINDOW_NAME" $SCHEDULE_TYPE "$DATE_STRING" $DAY_OF_WEEK $WEEK_OF_MONTH 0 5 35`