Native task/function scheduling #927
Replies: 2 comments 1 reply
-
The format of time string in |
Beta Was this translation helpful? Give feedback.
-
I don't think this should be a functionality native to Starlite. This is a very complex thing, we'd just be re-inventing the wheel and there's really not much that can be integrated with Starlite. The example you posted for instance is just an alternative way of describing a task. There's other scheduling libraries out there aside from Celery, and a library like that is what you really want to use. The only thing that could be useful I think would be an integration for development environments, so you don't have to start worker processes manually. |
Beta Was this translation helpful? Give feedback.
-
Recently I had a requirement in my Django project were I had to run a function every 24 hours (specifically at 1 AM), I used Celery but their docs page was down; it was really frustrating to make it work. So I am suggesting adding this feature to Starlite.
Some key points:
My proposed example:
invoke: int = 1
at_utc: list[str]
offset: str = None
2
times at09:12:00
.at_utc
list ieat_utc=["09:12:00", "11:02:42"]
the function will be called/invoked at those two different time, in other words, it will run total of4
times (2 times at 09:12:00 and 2 times at 11:02:42)Beta Was this translation helpful? Give feedback.
All reactions