aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.py b/main.py
index 6324aff..aee4264 100755
--- a/main.py
+++ b/main.py
@@ -67,7 +67,10 @@ if __name__ == "__main__":
sys.exit(-1)
else:
log.info("Running cron at frequency " + args.crontime)
- if jobManager.execute_jobs(args.crontime):
- jobManager.mark_jobs_ran()
- else:
+ try:
+ if jobManager.execute_jobs(args.crontime):
+ jobManager.mark_jobs_ran()
+ else:
+ jobManager.mark_jobs_ran_with_error()
+ except:
jobManager.mark_jobs_ran_with_error()