You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples.rst
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,11 +193,10 @@ To remove all jobs from the scheduler, use ``precise_scheduler.clear()``
193
193
# [Every 1 second do greet(name='Harry') (last run: 2023-03-07 14:12:51, next run: 2023-03-07 14:12:52), Every 2 seconds do greet(name='Alice') (last run: 2023-03-07 14:12:51, next run: 2023-03-07 14:12:53), Every 1 minute do greet(name='Bob') (last run: 2023-03-07 14:12:51, next run: 2023-03-07 14:13:51), Every 1 hour do greet(name='Sam') (last run: 2023-03-07 14:12:51, next run: 2023-03-07 15:12:51)]
194
194
# []
195
195
196
+
Get several jobs, filtered by tags
197
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196
198
197
-
Cancel several jobs, filtered by tags
198
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199
-
200
-
You can cancel the scheduling of a group of jobs selecting them by a unique identifier.
199
+
You can retrieve a group of jobs from the scheduler, selecting them by a unique identifier.
201
200
202
201
.. code-block:: python
203
202
@@ -211,13 +210,11 @@ You can cancel the scheduling of a group of jobs selecting them by a unique iden
# [Every 1 day do greet('Andrea') (last run: [never], next run: 2023-03-08 14:34:01), Every 1 hour do greet('John') (last run: [never], next run: 2023-03-07 15:34:01), Every 1 hour do greet('Monica') (last run: [never], next run: 2023-03-07 15:34:01), Every 1 day do greet('Derek') (last run: [never], next run: 2023-03-08 14:34:01)]
218
-
# [Every 1 hour do greet('John') (last run: [never], next run: 2023-03-07 15:34:01), Every 1 hour do greet('Monica') (last run: [never], next run: 2023-03-07 15:34:01)]
213
+
friends = precise_scheduler.get_jobs('friend')
214
+
print(friends)
215
+
216
+
Will return a list of every job tagged as ``friend``.
219
217
220
-
Will prevent every job tagged as``daily-tasks``from running again.
0 commit comments