• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run a big process

Hi everyone, how are you?

I have a big problem with my project. I need to ping a list with 300 feeds and save in my database every hour (I will use the cronjob). But, how is the best method to do that without overload my server and database?

I would store the list of feeds in a database table with the last time they were pinged

I would set up the cron job to find the oldest X feeds where the time stamp is < 60 minutes and to ping them in sequence and then update the date time.

If the select statement returns no records, then the cron job doesn't need to run.

You can them play around with the timing of the cron job and the number of records to be returned to determine a suitable load on the server.

I second that. I was thinking the exact same things when I first saw this post, but I was trying to figure out if there was a better way.

You can also use sleep() if you need to during your processing, although I doubt you'll need to.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.