diff options
-rw-r--r-- | README | 4 | ||||
-rwxr-xr-x | jobs/EmailChecker.py | 1 | ||||
-rwxr-xr-x | jobs/JobBase.py | 2 | ||||
-rwxr-xr-x | main.py | 2 |
4 files changed, 7 insertions, 2 deletions
@@ -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): @@ -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() |