Answer the question
In order to leave comments, you need to log in
How to yank method at intervals?
Hello!
I'm trying to figure out how to call a method at certain intervals.
In short, I pull the method, get the data and add everything to the database, i.e. in the database there is such an entry:
id=1, datetime='12.12.2017 01.22', content='bla-bla'
For each entry from the database, I need to pull one more method, but after 5 and 30 minutes from the time specified in the datetime field .
Tell me, please, how can this be done?
Schedule a method to run before writing to the database? Is it possible to write three timestamps to the database (original, +5 minutes, +30 minutes) and make a trigger that will call the required method when a certain time comes? How can you not comb through the entire database every minute?
I would be glad if you at least tell me where to dig. I plan to raise the server to flask, I would like a solution for it.
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question