From e3af73e4a53f9dd245d6d989c5ef982f3ce623c4 Mon Sep 17 00:00:00 2001 From: Lonami Date: Wed, 31 Jul 2019 13:53:38 +0200 Subject: [PATCH] Updated Scheduling Functions (markdown) --- Scheduling-Functions.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Scheduling-Functions.md b/Scheduling-Functions.md index 97475cb..584233d 100644 --- a/Scheduling-Functions.md +++ b/Scheduling-Functions.md @@ -42,4 +42,18 @@ async def 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. \ No newline at end of file