MaintenanceWindow - updateWindowWithMonthlySchedule

MaintenanceWindow - updateWindowWithMonthlySchedule

Description :

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.

  • SUNDAY=1
  • MONDAY=2
  • FRIDAY=32

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 :

Variable Name

Variable Type




Name of Maintenance Window to be updated

scheduleTypeIntegerType of monthly schedule. Valid types are listed above.
dateStringStringMonthly 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.

windowDurationDaysStringDuration, number of days
windowDurationHoursStringDuration, number of hours
windowDurationMinutesStringDuration, 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




DATE_STRING="2005-01-01 23:35:00"



WINDOW_KEY=`blcli MaintenanceWindow updateWindowWithMonthlySchedule 
Was this page helpful? Yes No Submitting... Thank you