Skip to content
Advertisement

How to schedule concurrent.future.Threadpool.executor map() function in python

I have one web scraping function which fetches data of 190 URL’s. To complete it fast I used concurrent.future.Threadpool.executor. I am saving that data to SQL Server database. I have to do these all process repeatedly to every 3 mins from 9AM to 4PM. But when I use while loop or scheduler that concurrent future not works. No error and no output.

JavaScript

I want to repeat all these things to every 3 mins, explained flow of code. Please help me how to schedule it.

JavaScript

So under these while loop I want to call that function using concurrent.futures.

Advertisement

Answer

You can create a seperate function and schedule it to execute the data_fetched(). I hope your urls variable contains the list of urls and not empty list.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement