Topic Options
#1665 - 07/02/06 05:59 PM Extension: Alerts work on a schedule
Pete Ness Offline



Registered: 08/30/99
Posts: 1106
Loc: Boise, Idaho
Extension Goal:

This extension allows you to set up a schedule for an alert based on the time of day and day of the week.

For example, you can set up an alert that only notifies you of problems from 9:00 to 17:00 Monday through Thursday, and not at all on Friday, Saturday or Sunday.

Required PingPlotter Pro version

This extension requires PingPlotter Pro 3.00.3p beta 10 or higher. It will *not* work on the released 3.00.2p version.

Installation Instructions
  • Download the attachment from this post (link near the title). The file will be named "Alert Condition - Scheduled.ppx".
  • Save it in your "c:\Program Files\Pingplotter Pro\scripts" directory (or the appropriate path if you've not installed to that location).
  • Close and restart PingPlotter Pro.
  • Go to the alerts setup (Edit -> Alert Setup...)
  • Create a new alert, or select one of your existing alerts you want to
    test this on.
  • In the "Method" dropdown, select "Latency - on a schedule"
  • You'll see a new area for the days of the week and times. Fill that in with appropriate times. The time ranges entered are times the alert will fire. Anything outside of those ranges will not cause the alert to fire.
  • Continue to configure the alert, per your needs.
Wrap up

If you find any issues are problems, please post a message here or send an email to support@pingplotter.com.

**Update (April 15, 2015): PingPlotter v4 requires an updated version of this script to work, which you'll find attached below.


Attachments
Alert Condition - Scheduled.ppx (1804 downloads)
Alert Condition - Scheduled(v4).ppx (1246 downloads)



Edited by Gary (04/15/15 01:00 PM)

Top
#1666 - 07/02/06 10:38 PM Re: Extension: Alerts work on a schedule [Re: Pete Ness]
Pete Ness Offline



Registered: 08/30/99
Posts: 1106
Loc: Boise, Idaho
Here's a screenshot of the time editor.


Attachments
1690-AlertOnASchedule.png



Top
#1667 - 05/16/07 02:44 AM Re: Extension: Alerts work on a schedule [Re: Pete Ness]
Shane Vincent Offline


Registered: 05/10/07
Posts: 4
Loc: Victoria, Australia
Hi Pete,
Just a quick question, will a time range like this work
Mon: 19:00 18:00

I know it seems back to front but i'm only trying to exclude alerts from 6PM to 7PM. Otherwise i will just use 00:00 to 18:00

Thanks - Shane

Top
#1668 - 05/16/07 02:57 AM Re: Extension: Alerts work on a schedule [Re: Shane Vincent]
Pete Ness Offline



Registered: 08/30/99
Posts: 1106
Loc: Boise, Idaho
Nope - you can't *exclude* a time, you can only include it.

If you're brave, though, you can edit the script and reverse the behavior. If you make a copy of the script and save it to "Alert Condition - Scheduled (reverse logic).ppx" (or something similar), you just have to edit one line of the script to change the behavior.

Line 115 of the script is this:
Code:
      if ((Time < StartTimes(CurDayOfWeek) / (24 * 60))) or (Time >= ((EndTimes(CurDayOfWeek) + 1) / (24 * 60))) then
        ' We're outside the time window!
        exit sub
      end if


If you change it to this, then the time window will be an exclusion window, rather than inclusive:

Code:
      if ((Time >= StartTimes(CurDayOfWeek) / (24 * 60))) and (Time < ((EndTimes(CurDayOfWeek)) / (24 * 60))) then
        ' We're inside the time window - don't check!
        exit sub
      end if


- Pete

Top
#1669 - 05/16/07 11:49 PM Re: Extension: Alerts work on a schedule [Re: Pete Ness]
Shane Vincent Offline


Registered: 05/10/07
Posts: 4
Loc: Victoria, Australia
Once again thanx, works great.

I also removed the 'exit sub' in the line above so that if 00:00 to 00:00 is entered it will check all day and of course i changed some wording around for the comments.

Cheers - Shane

Top

Search

Who's Online
0 registered (), 15 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod