PHP - Include or Header
<p>I need some advice on the best way to set up a process that I am running which runs a series of scripts that run one after the other and will potentially be a cron job.
Each one can be run on its own but depends on the previous job having run successfully for it to work.
My sequence is as follows:</p>

<ol>
<li>Set variables for the jobs.</li>
<li>Extract a csv file from an email when it arrives.</li>
<li>Parse that csv file into the database</li>
<li>Generate a series of PDF files based on the database with the new data and 1 above.</li>
<li>Email those PDFs to the required recipients.</li>
</ol>

<p>Given the above I cannot do any step until the previous one is complete.</p>

<p>Each step is its own php script.</p>

<p>What I’d like advice on is what the best method to set this up is.</p>

<p>At the moment I have a single page with all the above as include statements in one page.</p>

<p>Each one runs and then the next runs etc. </p>

<p>I’m not sure if this fairly long script is the best way or whether I should actually use a Header statement to make each one run and then return to my main action page with some variables confirming the previous script has run.</p>

<p>Does it make any difference?</p>
