protect from bad functions in cron
This commit is contained in:
parent
2dcb4c575b
commit
ec6a3dc90e
1 changed files with 7 additions and 1 deletions
|
@ -119,7 +119,13 @@ class Job(object):
|
|||
return self.__str__()
|
||||
def check(self):
|
||||
if self.lastrun + self.interval < time.time():
|
||||
self.function()
|
||||
if not debug:
|
||||
try:
|
||||
self.function()
|
||||
except:
|
||||
dbg("problem")
|
||||
else:
|
||||
self.function()
|
||||
self.lastrun = time.time()
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue