Skip to content

How to add tasks with schedules in an already running scheduler. #275

Answered by s3rius
suspiciousRaccoon asked this question in Q&A
Discussion options

You must be logged in to vote

There is an undocumented way for doing this. You can call schedule_by_* methods on the task.

Methods are defined here:

async def schedule_by_cron(

async def schedule_by_time(

These methods were in beta but now they can be officially added to docs. Docs will be updated soon.

schedules are added when the task is discovered

This is true only for LabeledScheduleSource which operates on labels. But for schedule sources that support dynamic schedule declaration this is not true. As an example of such ScheuleSource you can take a look at RedisScheduleSource.

https://github.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@suspiciousRaccoon
Comment options

@s3rius
Comment options

Answer selected by suspiciousRaccoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants