title: PHP process that will always be on
body: <p>I'm working on a project for my company. Essentially we are going to have a long running process that will hit APIs on a python server to send and recieve JSON responses. It will take the data from these API calls and update tables in a mysql database. It will be responsive, but also perform scheduled tasks.</p>
  
  <p>The code is written and it functions properly. The question is, how do you execute this intelligently? While being memory conscious.</p>
  
  <p>Much like <a href="https://stackoverflow.com/questions/15736237/developing-always-running-php-script">this question</a> I am at the moment, very regretfully and in spite of my many reservations, using a <code>while(true)</code> loop to run infinitely with a sleep of 15 seconds after everything finishes. The referenced question didn't have very many viable answers and is nearly 3 years old. Any suggestions on how to execute this in a way that will be memory friendly and intelligent.</p>