Path to hestia user cron commands

Eris,

You are correct. The moodle cron script is located in

/home/user/web/domain/public_html/admin/cli/cron.php

I have ran it with php7.4 located at

/usr/ bin/php7.4

I guess you are saying that a user does not need elivated privileges and therefore does not need to add sudo to their cron command. Here is the cron command I am using:

/usr/local/bin/php7.4 /home/myserveruser/public_html/moodle/admin/cli/cron.php

While this works, moodle insists on running it every minute which leads to an email being sent every minute which floods the moodle admin email box. To get the emails not sent, moodle forum members recommend to add >/dev/null to the end of the command:

/usr/local/bin/php7.4 /home/myserveruser/public_html/moodle/admin/cli/cron.php >/dev/null

This leads to a once a day error email being sent that the cron command cannot find or connect to the database. Other moodle forum members recommend adding >/dev/null 2>&1 to the end of the command:

/usr/local/bin/php7.4 /home/myserveruser/public_html/moodle/admin/cli/cron.php >/dev/null 2>&1

This seems to be working when viewing the Moodle admin panel. But there are no emails sent with or without errors and I have no idea why adding 2>&1 suddenly makes the command work.

I had hoped that copying what Hestia does with its cron jobs that I could overcome this problem. But if I should not add sudo to the beginning, then I guess I will need to find some other way to get Hestia and Moodle to work together.