Scenario 3: Alternating Weeks

Reading Time: 2 minutes

In this scenario John and Bob alternate handling alerts every other week. John handles alerts Sunday through Saturday one week, and Bob handles alerts for the following seven days. This continues in perpetuity.

1 . Define a timeperiod for when John should receive notifications. Assuming today’s date is Sunday, July 29th, 2017 and John is handling notifications this week (starting today), the definition would look like this:

define timeperiod{
	timeperiod_name		john-oncall
	2017-07-29 / 14	00:00-24:00	; Every 14 days, starting Sunday, July 29th, 2017
	2017-07-30 / 14	00:00-24:00	; Every other Monday starting July 30th, 2017
	2017-07-31 / 14	00:00-24:00	; Every other Tuesday starting July 31st, 2017
	2017-08-01 / 14	00:00-24:00	; Every other Wednesday starting August 1st, 2017
	2017-08-02 / 14	00:00-24:00	; Every other Thursday starting August 2nd, 2017
	2017-08-03 / 14	00:00-24:00	; Every other Friday starting August 3rd, 2017
	2017-08-04 / 14	00:00-24:00	; Every other Saturday starting August 4th, 2017
	}

2 . Now define a timeperiod for when Bob should receive notifications. Bob gets notifications on the weeks that John doesn’t, so his first on-call day starts next Sunday (August 5th, 2017).

define timeperiod{
	timeperiod_name		bob-oncall
	2017-08-05 / 14	00:00-24:00	; Every 14 days, starting Sunday, August 5th, 2017
	2017-08-06 / 14	00:00-24:00	; Every other Monday starting August 6th, 2017
	2017-08-07 / 14	00:00-24:00	; Every other Tuesday starting August 7th, 2017
	2017-08-08 / 14	00:00-24:00	; Every other Wednesday starting August 8th, 2017
	2017-08-09 / 14	00:00-24:00	; Every other Thursday starting August 9th, 2017
	2017-08-10 / 14	00:00-24:00	; Every other Friday starting August 10th, 2017
	2017-08-11 / 14	00:00-24:00	; Every other Saturday starting August 11th, 2017
	}

3 . Now you need to reference these timeperiod definitions in the contact definitions for John and Bob:

wpadmin
Author: wpadmin