aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-12-12 12:02:27 +0000
committerGravatar jesopo2019-12-12 12:02:27 +0000
commit48bab203bf15ad16b953f99b80b37ded1959f87b (patch)
treead4c99a8ab0362b8a747134b54d1dc2670ef90b1 /src
parentswitch coins.py to use cron timers (diff)
signature
comma-separated cron schedule check should be first
Diffstat (limited to 'src')
-rw-r--r--src/core_modules/cron.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core_modules/cron.py b/src/core_modules/cron.py
index 30aca2d7..d9793e02 100644
--- a/src/core_modules/cron.py
+++ b/src/core_modules/cron.py
@@ -30,16 +30,16 @@ class Module(ModuleManager.BaseModule):
return True
def _schedule_match_part(self, timestamp_part, schedule_part):
- if schedule_part.startswith("*/"):
- schedule_step = int(schedule_part.split("*/", 1)[1])
- if (timestamp_part%schedule_step) == 0:
- return True
-
- elif "," in schedule_part:
+ if "," in schedule_part:
for schedule_part in schedule_part.split(","):
if self._match([timestamp_part], [schedule_part]):
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 == "*":
return True