mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-18 15:20:42 +01:00
jobqueue: Add docstring note about intervals and DST (#1397)
Fixes #1381
This commit is contained in:
parent
2cde878d1e
commit
9d005d5124
1 changed files with 10 additions and 0 deletions
|
@ -172,6 +172,11 @@ class JobQueue(object):
|
||||||
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
|
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
|
||||||
queue.
|
queue.
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
`interval` is always respected "as-is". That means that if DST changes during that
|
||||||
|
interval, the job might not run at the time one would expect. It is always recommended
|
||||||
|
to pin servers to UTC time, then time related behaviour can always be expected.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
job = Job(callback,
|
job = Job(callback,
|
||||||
interval=interval,
|
interval=interval,
|
||||||
|
@ -202,6 +207,11 @@ class JobQueue(object):
|
||||||
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
|
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
|
||||||
queue.
|
queue.
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
Daily is just an alias for "24 Hours". That means that if DST changes during that
|
||||||
|
interval, the job might not run at the time one would expect. It is always recommended
|
||||||
|
to pin servers to UTC time, then time related behaviour can always be expected.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
job = Job(callback,
|
job = Job(callback,
|
||||||
interval=datetime.timedelta(days=1),
|
interval=datetime.timedelta(days=1),
|
||||||
|
|
Loading…
Reference in a new issue