logging?
I want to have a function which sends a message to myself every 1 hour so i know the script is running. but because of this awaits it won't work, any suggestion?
why exactly "it won't work"
since the await stops the whole while True loop i can't just run the coroutine in that block.
isn't that what you want, to sleep or something, otherwise show what the functions do, it doesn't make much sense now
this is the main part of program and it sends some message in a particular order so awaiting them make sense but i want another function separately which send a message every 1H but this for loop might take a day to complete so it will stop the execution of logging() function i want to create. maybe i should run it in another event loop?
i don't see anything related to "logging()" in both of the codes, anyway, search about create_task in asyncio if you want to run a coroutine in background without awaiting in the context
> i don't see anything related to "logging()" yes because i'm trying to figure out how to write it, i didn't want to share picture of a broken code.
Обсуждают сегодня