summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-01-26 16:35:50 -0500
committerTom Ritter <tom@ritter.vg>2016-01-26 16:35:50 -0500
commit892af69a33d4f0192bba1d3b0bc2ad688578a576 (patch)
treeeb3b6b02320bd61328f10466927f2f499a468b75
parent869de79cc6483f5583b2f9bddd08720d103c8bec (diff)
Add day and daily at noon options
-rw-r--r--README4
-rwxr-xr-xjobs/EmailChecker.py1
-rwxr-xr-xjobs/JobBase.py2
-rwxr-xr-xmain.py2
4 files changed, 7 insertions, 2 deletions
diff --git a/README b/README
index 0cda7f3..6097c8e 100644
--- a/README
+++ b/README
@@ -5,4 +5,6 @@ First edit the ... to your path
* * * * * .../checker/main.py -m cron -c minute >/dev/null 2>&1
0 * * * * .../checker/main.py -m cron -c hour >/dev/null 2>&1
-
+ 0 0 * * * .../checker/main.py -m cron -c day >/dev/null 2>&1
+ 0 0 12 * * .../checker/main.py -m cron -c day_noon >/dev/null 2>&1
+
diff --git a/jobs/EmailChecker.py b/jobs/EmailChecker.py
index ee6db77..7c61f01 100755
--- a/jobs/EmailChecker.py
+++ b/jobs/EmailChecker.py
@@ -3,6 +3,7 @@
import os
import base64
import datetime
+import logging
import imaplib
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index a10bdeb..8ecdef4 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -8,6 +8,8 @@ import smtplib
class JobFrequency:
MINUTE = "minute"
HOUR = "hour"
+ DAY = "day"
+ DAY_NOON = "day_noon"
class JobBase:
def __init__(self):
diff --git a/main.py b/main.py
index 0907da0..6324aff 100755
--- a/main.py
+++ b/main.py
@@ -22,7 +22,7 @@ from servers import StatusSite, PingSite
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Check your stuff.")
parser.add_argument('-m', '--mode', choices=['daemon', 'cron'], required=True, help='The mode the application will run it.')
- parser.add_argument('-c', '--crontime', choices=['minute', 'hour'], help='When in cron mode, the increment of cron.')
+ parser.add_argument('-c', '--crontime', choices=['minute', 'hour', 'day', 'day_noon'], help='When in cron mode, the increment of cron.')
parser.add_argument('-v', action="store_true", help="Print verbose debugging information to stderr")
args = parser.parse_args()