going through some old code, and realized i never posted this. You can run php as a shell script.
add #!/usr/bin/php -q replace /usr/bin/ with your php path. a quick which php will find it for you.
chmod the file to executable and call the file from the command line. also remember to call the file directly, you don’t need to call it through php.
I like to use this for keeping database / file maintenance tasks outside of the web directory.
Yes this works with cron.








