excuting a php code after specific time
<p>Let's say that there are two PHP functions.</p>

<pre><code>funtion first()
{

     $keyword = $this-&gt;input-&gt;post('keyword');

     //search for the result and show it to users.
     $this-&gt;search-&gt;search($keyword);

     //send the keyword to save it into the db.
     $this-&gt;second($keyword);
}


function second($keyword)
{
      //saving a search keyword in the db
}
</code></pre>

<p>I would like to send the result as soon as possible and save the search word into db.</p>

<p>However, I wanna run the second script later after specific time.</p>

<p>because I want to deliver the search result as soon as possible to my customer.</p>

<p>Is there a way to run second php script after a user run the first php script?</p>

<pre><code>* I don't want to use Cron Job
* I wanna run those two script separatly. 
* don't want to use sleep because it will stop the first script for certain times.
</code></pre>
