Two admins – John and Bob – are responsible for responding to BLËSK alerts. John receives all notifications for weekdays (with 24 hour days), excluding holidays; Bob handles notifications during the weekends and holidays. Lucky Bob. Here’s how you can define this type of rotation using timeperiods…
1 . First, define 3 timeperiods that contains time ranges for holidays, weekdays, and weekends:
define timeperiod{ name weekdays timeperiod_name weekdays 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 }
define timeperiod{ name weekends timeperiod_name weekends saturday 00:00-24:00 sunday 00:00-24:00 }
define timeperiod{ name holidays timeperiod_name holidays january 1 00:00-24:00 ; New Year's Day 2008-03-23 00:00-24:00 ; Easter (2008) 2009-04-12 00:00-24:00 ; Easter (2009) monday -1 may 00:00-24:00 ; Memorial Day (Last Monday in May) july 4 00:00-24:00 ; Independence Day monday 1 september 00:00-24:00 ; Labor Day (1st Monday in September) thursday 4 november 00:00-24:00 ; Thanksgiving (4th Thursday in November) december 25 00:00-24:00 ; Christmas december 31 17:00-24:00 ; New Year's Eve (5pm onwards) }
2 . Next, define a timeperiod for John’s on-call times that include weekdays, but excludes the dates/times defined in the holidays timeperiod above:
define timeperiod{ timeperiod_name john-oncall use weekdays ; Include weekdays exclude holidays ; Exclude holiday dates/times }
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 weekends and the dates/times defined in the holidays timeperiod above:
define timeperiod{ timeperiod_name bob-oncall use weekends,holidays ; Include weekend and holiday }
5 . You can now reference this timeperiod in Bob’s contact definition: