Skip to content

Commit 93a2fed

Browse files
authored
Improved examples, added links to docs
1 parent 85c2130 commit 93a2fed

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/source/topics/scheduling.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ But it is easy to integrate pyrogram with your favourite scheduler.
99
schedule
1010
--------
1111

12-
Note that schedule is not suitable for async version of pyrogram.
13-
1412
.. code-block:: python
1513
1614
import time
@@ -20,20 +18,15 @@ Note that schedule is not suitable for async version of pyrogram.
2018
def job():
2119
app.send_message("me", "Hi!")
2220
23-
24-
schedule.every(10).minutes.do(job)
25-
schedule.every().hour.do(job)
26-
schedule.every().day.at("10:30").do(job)
27-
schedule.every(5).to(10).minutes.do(job)
28-
schedule.every().monday.do(job)
29-
schedule.every().wednesday.at("13:15").do(job)
30-
schedule.every().minute.at(":17").do(job)
21+
schedule.every(3).seconds.do(job)
3122
3223
with app:
3324
while True:
3425
schedule.run_pending()
3526
time.sleep(1)
3627
28+
Note that schedule is not suitable for async version of pyrogram.
29+
For more information read `library <https://schedule.readthedocs.io/>`_ docs.
3730

3831
apscheduler
3932
-----------
@@ -71,3 +64,4 @@ Apscheduler supports async version of pyrogram too, here is async example:
7164
scheduler.start()
7265
app.run()
7366
67+
For more information read `library <https://apscheduler.readthedocs.io/>`_ docs.

0 commit comments

Comments
 (0)