Create a php file called logscript.php and put this in it:
and pu it in in /home/myname/mywebsit
then set that as a cronjob the same way you do the Hubzilla cron for example:
*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php logscript.php Cron > /dev/null 2>&1