Scenario 4: Vacation Days

Reading Time: 2 minutes

In this scenarios, John handles notifications for all days except those he has off. He has several standing days off each month, as well as some planned vacations. Bob handles notifications when John is on vacation or out of the office.

1 . First, define a timeperiod that contains time ranges for John’s vacation days and days off:

define timeperiod{
	name			john-out-of-office
	timeperiod_name		john-out-of-office
	day 15			00:00-24:00	; 15th day of each month
	day -1			00:00-24:00	; Last day of each month (28th, 29th, 30th, or 31st)
	day -2			00:00-24:00	; 2nd to last day of each month (27th, 28th, 29th, or 30th)
	january 2		00:00-24:00	; January 2nd each year
	june 1 - july 5		00:00-24:00	; Yearly camping trip (June 1st - July 5th)
	2017-11-01 - 2017-11-10	00:00-24:00	; Vacation to the US Virgin Islands (November 1st-10th, 2017)

2 . Next, define a timeperiod for John’s on-call times that excludes the dates/times defined in the timeperiod above:

define timeperiod{
	timeperiod_name		john-oncall
	monday			00:00-24:00
	tuesday			00:00-24:00
	wednesday		00:00-24:00
	thursday		00:00-24:00
	friday			00:00-24:00
	exclude			john-out-of-office	; Exclude dates/times John is out

3 . You can now reference this timeperiod in John’s contact definition:

4 . Define a new timeperiod for Bob’s on-call times that include the dates/times that John is out of the office:

define timeperiod{
	timeperod_name		bob-oncall
	use			john-out-of-office	; Include holiday date/times that John is out

5 . You can now reference this timeperiod in Bob’s contact definition:

Author: wpadmin