But Oh yeah, that's a quite interesting approach, and possibly I can get to add that scheduler as an attribute to the bot class in order to access it in commands,
thanks for the help.
whats up fols
im learning just now this incredible library
but im having some difficulties to understand some concepts
one of them is about scheduled jobs and what one job must need to be scheduled
in this example I made on main loop of asyncio, one job what scheduled to happend soon, while other 60 of them would happen every minute after a while
the idea was to just see how the library talks to postgres
the times were all correct, the table TEST were created on the database, but none of the tasks were stored there, which got me confused
as tasks comes to the scheduler, shouldn't it immediately save it on the database?
not only that, when print_jobs is called, it says "no scheduled jobs"
using debug mode, i think i got a clue of what is happening: "INFO:apscheduler.scheduler:Added job "simple_job" to job store "default""
it sent to default store when i should sent it to my store, hmmm
I now suspect it has something to do with being async?
@mgrazianoc if you don't specify the store to save it to, it goes to default
if you want all jobs to go to postgres, you should name it default
also I'm not seeing you start an asyncio event loop anywhere
if you don't want an asyncio event loop, why use AsyncIOScheduler?
oh, thanks for the reply
there's a call of asyncio below the print, asyncio.get_event_loop().run_forever()
for some odd reason, I thought that naming it "postgres" would do the job, but it does makes sense to save it as default, since we are ovewriting it
i'm gonna test it today
this library is really good
it worked, thanks. Now I understand wthat the documentation means about "non-serialized", you can't pass the scheduler to a job
Hi, how can I see id of jobs in get_jobs messages?
what are you talking about?
I wanna see id when I use get_jobs or print_jobs.
well you get whole job objects when you call get_jobs()
so just access the id attribute of each job
as for print_jobs(), I remember talking about that with someone
definitely something I will consider with apscheduler 4
Hi, what is the expected behavior for jobs that are added tentatively, if the app shuts down without the scheduler ever starting? I'm also noticing that tentatively scheduled jobs cannot be serialized (getstate) because they don't necessarily have misfire_grace_time set.
I can open a github report for the second one, unless it's expected behavior
Also, to elaborate, I think I'm seeing that tentatively-added jobs disappear if the process ends -- they aren't tentatively added to any datastore, they're just added in-memory