title: Best practices for running a PHP cronjob continuously
body: <p>I need to run some tasks continuously. These tasks consist, mainly, of retrieving specific records from the DB, analyzing and saving them. This a non-trivial analysis, which might take several seconds (more than a minute, perhaps).
  I do not know how frequently will new records be saved in the DB waiting for analysis (there's another cronjob for that).</p>
  
  <p>Should I retrieve records one by one calling the same analysis function again once it finishes (recursively) and try to keep the cronjob running until there are no more unanalyzed records?
  Or should I retrieve a fixed amount of new records on each cronjob run and call the cronjob every certain amount of minutes?</p>