So I have never done a cron job before in my life.
I want to set one for /home/domain/logs/php_log to delete the file and remake it
and
/var/log/virtualmin/domain.xyz_access_log
That is a special case. What you’re wanting to do is called log rotation, and there is a tool for it already on your system called logrotate.
That service should already be rotating any logs created by Virtualmin. If it is not rotating fast enough or keep old rotated logs longer than you want (for disk space or data retention policy reasons), you should change the configuration of logrotate, rather than making your own cronjobs.
That said, I believe there is a known bug on some systems where the php_log isn’t being rotated. I don’t remember details, but it should be searchable.