comma-separated cron schedule check should be first
This commit is contained in:
parent
13f2baf303
commit
48bab203bf
1 changed files with 6 additions and 6 deletions
|
@ -30,16 +30,16 @@ class Module(ModuleManager.BaseModule):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _schedule_match_part(self, timestamp_part, schedule_part):
|
def _schedule_match_part(self, timestamp_part, schedule_part):
|
||||||
if schedule_part.startswith("*/"):
|
if "," in schedule_part:
|
||||||
schedule_step = int(schedule_part.split("*/", 1)[1])
|
|
||||||
if (timestamp_part%schedule_step) == 0:
|
|
||||||
return True
|
|
||||||
|
|
||||||
elif "," in schedule_part:
|
|
||||||
for schedule_part in schedule_part.split(","):
|
for schedule_part in schedule_part.split(","):
|
||||||
if self._match([timestamp_part], [schedule_part]):
|
if self._match([timestamp_part], [schedule_part]):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
elif schedule_part.startswith("*/"):
|
||||||
|
schedule_step = int(schedule_part.split("*/", 1)[1])
|
||||||
|
if (timestamp_part%schedule_step) == 0:
|
||||||
|
return True
|
||||||
|
|
||||||
elif schedule_part == "*":
|
elif schedule_part == "*":
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue