Updated Scheduling Functions (markdown)

Lonami 2019-07-31 13:11:20 +02:00
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: