Activate Cron job from a PHP page
<p>I googled but didn't found any solution</p>

<pre><code>I have a PHP page that takes 45 minutes to execute.
</code></pre>

<p>What I am trying to achieve is:
1. Whenever I run a URL abc.com/test.php the script should check the cron job and activate it (run myscript.php) .
2. And should execute the page until it's complete.</p>

<p>So the PHP should call a cron job and execute it <code>ONLY</code> once when it is requested.Is Cron right approach </p>

<pre><code>I do not want the script below, which i tried This will add a script that runs every day at 9:30am.

    exec('echo -e "`crontab -l`\n30 9 * * * /path/to/script" | crontab -');
</code></pre>