How to find the valid php path of a cron job

I am trying to set the right cron command for the nextcloud cron. The setup suggest:

crontab -u www-data -e

*/5 * * * * php -f /var/www/nextcloud/cron.php

a) I am using PHP7.3 in CyberPanel. How can I find the right path of the PHP please?
b) How can I check if the Cron runs fine?

It will usually look something like this:

By default, cron jobs will send emails to their associated user if an error occurs.

Very thank you for your help.
How can I verify if the cron is executed please?

Use terminal and the command “whereis php”

I received:
php: /usr/bin/php

How can I verify that my cron is excuted? Thanks!

You can test the cron executing any file and then looking into the server logs.

Thanks, I have set some crons for wordpress sites and the crons are not working. So where exactly are the server logs please?


hellow can you help me i use cornjob in project and add command echo “CyberPanel”>/home/ but this command rewrite entire file
i also use /home/ this command also but my code was not running every minute for sending email. test.php file contain php code for sending mail please help me