I have written a CRON job in PHP which loops through the users table and fetches tweets of each user using Twitter API and then stores it in Database.
My concern is what if the number of users grow over a period of time will it be able to execute in the defined execution time which is currently set to max_execution_time of 300 or it would fail
It would be great if someone can tell me what is the best approach for tackling such scenarios
The code is pretty basic, it goes like this
best option is to use batch query specifying multiple userids in one request.
try this from:user1 OR from:user2 OR from:user3 and use the twitter search api to retrieve the batch results
other search query params can be seen here