Is it possible to invoke a crontab job once in Apache php slim framework?
<p>I have a php script which runs as the Apache daemon user, to first remove any existing crontabs that might be already installed by the daemon user, then adding the new crontab.</p>

<p>I wish to evoke this only once when my PHP Slim web application loads for the first time, ideally as part of the Apache startup. </p>

<p>It seems that putting it anywhere in the index.php file (either directly or via a require file) doesn't prevent the crontab script from being constantly reloaded. I've tried using <code>$GLOBAL</code> with an <code>if</code> statement, which unfortunately I haven't been able to formulate a working solution, however there must be something more rudimentary which allows me to invoke a php script just once after Apache has been restarted?</p>

<p>Ideally I'd rather not modify the Apache startup script since I wish to keep everything within the slim web application itself (for source control purposes).</p>