Email notifications for specific group at a specific time (work time)

Idea ID 1674506

Email notifications for specific group at a specific time (work time)

0 Votes

Email notifications for specific group at a specific time (work time)

In many monitoring systems, you can specify that notifications work only during business hours, this would make life better, especially with the least importance node group.

 

3 Comments
Micro Focus Expert
Micro Focus Expert
Moved to waiting for votes.
Micro Focus Expert
Micro Focus Expert
Status changed to: Waiting for Votes
 
Trusted Contributor.
Trusted Contributor.

We ourselves have solved the problem

# check day time branch
sub checkDayTimeBranchWork ($$) {
  my @split_originOccurrenceTime = split(" ", $originOccurrenceTime);
  my @work_day = ('Mon', 'Tue', 'Wed', 'Thu', 'Fri');
  my $day = $split_originOccurrenceTime[0]; 
  my $hour = substr ($split_originOccurrenceTime[3], 0, 2);
  my @split_managementAddress = split ('[/.-]', $managementAddress);
  my $three_octet = $split_managementAddress[2];

  # check day and time
  if (grep (/^$day$/, @work_day)) {
    if ($hour >= 6 and $hour <= 15){  
      return 1;
    } else {
      # if date and time - not woriking, (check is brahch?)
      if ($three_octet >= XX and $three_octet <= XX){
        return 0;
      } else {
        return 1;
      }
    }
  }
}

# Die run if day and time not business hour for branches
if (!checkDayTimeBranchWork($managementAddress, $originOccurrenceTime)){
  die "Die run if day and time not business hour for branches\n";
}
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.