title: Can I call a shell script from CodeIgniter which will in turn call a codeigniter controller function?
body: <p>I am somewhat of a newbie.<br>
  I am writing a social app in Codeigniter. Once the user logs in, many things have to be done to prepare the user network, send email, create a list of recommended friends, etc.
  We have already written functions to do that each of these. </p>
  
  <p>Lets say there is the main Controller index with function SignUp.</p>
  
  <p>After Sign up, we want to redirect the user to Dashboard controller but in the background, we want to run </p>
  
  <ol>
  <li>BuildNetwork</li>
  <li>FindMatches</li>
  <li>Send Emails</li>
  </ol>
  
  <p>I dont know how to run any task in background. So I was thinking maybe I can write a shell script that calls these functions one after the other.<br>
  We will call this script through Codeigniter and pass the UserId.<br>
  Then this script will call individual functions and pass the userId to those.</p>
  
  <p>Can anyone tell me</p>
  
  <ol>
  <li>If this is the right approach</li>
  <li>How is it done (this way or in any other way)</li>
  </ol>