Replies: 1 comment 4 replies
-
timezones: Either make the time timezone aware or use Getting info about jobs: Please see the docs of the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, (sorry for bad eng)
i am trying to working with JobQueue in v20.0b0.
I would like to add the possibility to any user to create any kind of "reminder".
I am asking to them the time when they want to receive the message, on what day/days and what text they wanna get.
I will store everything in a TinyDB for getting back it when the job will be called.
At the end of the data collection i will create a job like this:
context.job_queue.run_daily(remainder, chat_id=user.id, days=daysselected, time = time(hour = int(reminderhour), minute = int(reminderminute), second = 00), name=str(user.id))
With this system i am encountering 2 problem.
The first one is that i am not considering different timezone, how can you do that? it is possible to be specified in the
time =
?The second one is how can a user know what jobs he has active?
if i use
context.job_queue.get_jobs_by_name
i will get back<telegram.ext._jobqueue.Job object at 0x0000027D9092FB80>
how can you get back more information ? like days and time of the jobqueue?It is possible to get the same information that i am getting in the console?
apscheduler.executors.default - INFO - Running job "reminder (trigger: date[2022-12-20 14:07:38 UTC], next run at: 2022-12-20 14:07:38 UTC)" (scheduled at 2022-12-20 14:07:38.186185+00:00)
Thanks to everyone
Beta Was this translation helpful? Give feedback.
All reactions