Help: Time Specific CRON Expressions Seems Not Working #376
-
Description How to reproduce from taskiq_faststream import StreamScheduler
from taskiq.schedule_sources import LabelScheduleSource
from app.background_service.subscriber.test_subscriber import broker
from taskiq_faststream import BrokerWrapper
taskiq_broker = BrokerWrapper(broker)
taskiq_broker.task(
message={"test-schedule": "schedule test running every day at 11:00 PM"},
subject="test_schedule_subject",
schedule=[
{"cron": "00 23 * * *"}, # At 11:00 PM
],
)
scheduler = StreamScheduler(
broker=taskiq_broker,
sources=[LabelScheduleSource(taskiq_broker)],
) But the following CRON is working though taskiq_broker.task(
message={"task": "schedule test running at every two minute"},
subject="test_schedule_subject",
schedule=[
{"cron": "*/2 * * * *"}, # Runs every two minute
],
) Demo: Taskiq.specific.time.cron.not.working.mp4What might be causing CRON expressions specifying exact times to fail in taskiq-faststream? Are there any known limitations or additional configurations required for time-specific scheduling to work as expected? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It can be that your time offset is not the same with UTC. There's a paragraph about timezones on docs. You can cron_offset to verify that it works. |
Beta Was this translation helpful? Give feedback.
It can be that your time offset is not the same with UTC. There's a paragraph about timezones on docs. You can cron_offset to verify that it works.