added cronjob, changed service.py a little
This commit is contained in:
parent
0d5abb5f3b
commit
3969092ff7
2 changed files with 8 additions and 7 deletions
|
|
@ -7,9 +7,9 @@ class Service:
|
||||||
|
|
||||||
def _execute(self):
|
def _execute(self):
|
||||||
self.pre_execute()
|
self.pre_execute()
|
||||||
self.execute()
|
executionResult = self.execute()
|
||||||
self.parse_result()
|
parseResult = self.parse_result(executionResult)
|
||||||
self.handle_result()
|
self.handle_result(parseResult)
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
pass
|
pass
|
||||||
|
|
@ -17,8 +17,8 @@ class Service:
|
||||||
def pre_execute(self):
|
def pre_execute(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def parse_result(self):
|
def parse_result(self, executionResult):
|
||||||
self.parser._parse()
|
return self.parser._parse(executionResult)
|
||||||
|
|
||||||
def handle_result(self):
|
def handle_result(self, parseResult):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
"short":{ "seconds": 5, "comment": "Interval job; every 10 seconds" },
|
"short":{ "seconds": 5, "comment": "Interval job; every 10 seconds" },
|
||||||
"middle":{ "seconds": 60, "comment": "Interval job; every 60 seconds" },
|
"middle":{ "seconds": 60, "comment": "Interval job; every 60 seconds" },
|
||||||
"long":{ "minutes": 2, "comment": "Interval job; every 2 minutes" },
|
"long":{ "minutes": 2, "comment": "Interval job; every 2 minutes" },
|
||||||
|
"cron":{ "minute" : "0", "hour": "2", "comment": "cron job at 2"},
|
||||||
"christmas2013":{ "date": "2013-12-24 20:00:00", "comment": "Date Job; just one day at 8PM" }
|
"christmas2013":{ "date": "2013-12-24 20:00:00", "comment": "Date Job; just one day at 8PM" }
|
||||||
},
|
},
|
||||||
"hostgroups":{
|
"hostgroups":{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue