We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f5e816 commit 897e451Copy full SHA for 897e451
taskiq/schedule_sources/label_based.py
@@ -28,7 +28,7 @@ async def get_schedules(self) -> List["ScheduledTask"]:
28
if task.broker != self.broker:
29
continue
30
for schedule in task.labels.get("schedule", []):
31
- if "cron" not in schedule:
+ if "cron" not in schedule and "time" not in schedule:
32
33
labels = schedule.get("labels", {})
34
labels.update(task.labels)
@@ -38,7 +38,8 @@ async def get_schedules(self) -> List["ScheduledTask"]:
38
labels=labels,
39
args=schedule.get("args", []),
40
kwargs=schedule.get("kwargs", {}),
41
- cron=schedule["cron"],
+ cron=schedule.get("cron"),
42
+ time=schedule.get("time"),
43
),
44
)
45
return schedules
0 commit comments