ExclusionWindow - createWindowWithWeeklySchedule
ExclusionWindow - createWindowWithWeeklySchedule
Description :
This command creates a Window with a weekly schedule.
The dateString argument defines a weekly schedule to be added to the window definition. It must be in the format YYYY-MM-DD HH:MM:SS.
Use the daysOfWeek argument to specify a sum representing the days when the job should execute. Each day of the week has a value, as shown below:
- SUNDAY=1
- MONDAY=2
- TUESDAY=4
- WEDNESDAY=8
- THURSDAY=16
- FRIDAY=32
- SATURDAY=64
Add values representing the days when you want the window to be active. For example, if you want the window to be active on Monday, Wednesday, and Friday, then daysOfWeek=42.
Use the frequency argument to specify an interval in weeks for the window to be active (for example, 2 means the job runs every other week).
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
windowName | String | Name of Window |
windowDesc | String | Description of Window |
dateString | String | Weekly schedule for the Window. The date string must be in the format YYYY-MM-DD HH:MM:SS. |
daysOfWeek | Integer | Days of the week when the Window should be active. See above for a more detailed description. |
frequency | Integer | Interval in weeks when the Window should be active. |
windowDurationDays | String | Duration, number of days |
windowDurationHours | String | Duration, number of hours |
windowDurationMinutes | String | Duration, number of minutes |
Example
The following example shows how to create a new Window with a weekly schedule. In the example, the window is active every three weeks at 11:35 PM on Monday, Wednesday, and Friday.
Script
DATE_STRING="2016-01-01 23:35:00"
EXCLUSION_WINDOW_NAME="WEEKLY_WINDOW"
EXCLUSION_WINDOW_DESC="Weekly exclusion window"
DAYS_OF_WEEK=42
FREQUENCY=3
WINDOW_KEY=`blcli ExclusionWindow createWindowWithWeeklySchedule
"$EXCLUSION_WINDOW_NAME" "$EXCLUSION_WINDOW_DESC"
"$DATE_STRING" $DAYS_OF_WEEK $FREQUENCY 0 5 35`
Comments