From 0bbf7febbf8b2caa30bd5c8fa7b41d6a9f5caf9a Mon Sep 17 00:00:00 2001 From: "Rafael.Timmerberg" Date: Sun, 26 May 2013 23:32:10 +0200 Subject: [PATCH] added date period support --- lib/config/periods.py | 3 ++- linspector.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config/periods.py b/lib/config/periods.py index 6da9f74..92c2546 100644 --- a/lib/config/periods.py +++ b/lib/config/periods.py @@ -1,6 +1,6 @@ class Period: def __init__(self, name="", year="*", month="*", day="*", week="*", - day_of_week=None, hour="*", minute="*", second="0", + day_of_week=None, hour="*", minute="*", second="0", date=None, comment=None): self.name = name self.year = year # 4-digit year number @@ -12,6 +12,7 @@ class Period: self.minute = minute # minute (0-59) self.second = second # second (0-59) self.comment = comment + self.date = date def __str__(self): ret = "Period(Name: " + self.name + " Year: " + self.year + " Month: " + self.month + ")" diff --git a/linspector.json b/linspector.json index 4aa0e53..fe82248 100644 --- a/linspector.json +++ b/linspector.json @@ -149,7 +149,11 @@ "minute": "5", "second": "", "comment": "All day all night... every five minutes!" + }, + "next_christmas" : { + "date": "2013-12-24 20:00:00" } + }, "hosts": {