Hi,
create a bash file put everything in there. Write a logfile like this:
*/2 * * * * /full/path/to/your/script.sh > /writable/location/for/logfiles/log.txt 2>&1
Let the script run as user. php-cgi is called by the webserver, use php-cli
Regards,
Johannes