mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Updated Scheduling Functions (markdown)
parent
e6f7e52d98
commit
04f2431660
|
@ -12,7 +12,7 @@ def foo_cb():
|
|||
client.loop.call_later(10 * 60, foo_cb)
|
||||
```
|
||||
|
||||
[`loop.call_later()`](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_later) can only schedule synchronous functions (`call_cb`), but you can use `create_task` to spawn a background, asynchronous task.
|
||||
[`loop.call_later()`](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_later) can only schedule synchronous functions (`foo_cb`), but you can use `create_task` to spawn a background, asynchronous task.
|
||||
|
||||
You can also run something "every N seconds". For example, to repeat `foo` every 10 minutes:
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user