Help: Time Specific CRON Expressions Seems Not Working #376
Answered
by
s3rius
Atanusaha143
asked this question in
Q&A
|
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? |
Answered by
s3rius
Nov 21, 2024
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. |
0 replies
Answer selected by
Atanusaha143
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.