 <p>You may want to look into starting a worker via beanstalk. </p> <p><a href="http://kr.github.io/beanstalkd/" rel="nofollow">http://kr.github.io/beanstalkd/</a></p> <p>You send a message containing the download link, and the email to send to. A worker can be started on demand when your message is sent, and automatically start the download. When the download is complete, your worker would fire off the email.</p> <p>The PHP library to allow you to interface with beanstalk can be found here:</p> <p><a href="https://github.com/pda/pheanstalk" rel="nofollow">https://github.com/pda/pheanstalk</a></p>