mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Updated Scheduling Functions (markdown)
parent
53ef1c63ea
commit
e3af73e4a5
|
@ -42,4 +42,18 @@ async def foo():
|
||||||
client.loop.create_task(foo())
|
client.loop.create_task(foo())
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When you're done setting everything up, the event loop must be running or things won't work. You can do this with:
|
||||||
|
|
||||||
|
```python
|
||||||
|
client.run_until_disconnected()
|
||||||
|
```
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
```python
|
||||||
|
loop.run_forever()
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
If you don't mind using other libraries, [`aiocron`](https://github.com/gawel/aiocron) is a good option. See https://crontab.guru/ to learn its time syntax.
|
If you don't mind using other libraries, [`aiocron`](https://github.com/gawel/aiocron) is a good option. See https://crontab.guru/ to learn its time syntax.
|
Loading…
Reference in New Issue
Block a user