mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 01:16:35 +03:00
Updated Scheduling Functions (markdown)
parent
4c818131d6
commit
53ef1c63ea
|
@ -28,6 +28,9 @@ foo_cb()
|
|||
```
|
||||
|
||||
This schedules itself again when it runs, so it is always running. It runs, 10 minutes pass, it schedules itself again, and repeat. This is similar to JavaScript's [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout).
|
||||
|
||||
> **Important note**. Do **not** call the synchronous function when you schedule it, or it will recurse forever. `loop.call_later(delay, func())` won't work, but `loop.call_later(delay, func)` will.
|
||||
|
||||
You can also use `while` loops:
|
||||
|
||||
```python
|
||||
|
|
Loading…
Reference in New Issue
Block a user