CronJob run php command

hi, I have a cronjob that runs this command:
php class/email_unpaid_invoices_to_customers.php confirm thirdparties 1 0

if I start it manually it works, but if I start it from the link it gives me this error: Could not open input file: class/email_unpaid_invoices_to_customers.php
what’s the problem?
thank you

Hi,

php doesn’t find the file.
You need to put the complete path

1 Like

work thanks
but now if I start manually it works fine, if I start from a link it gives me this error when send email:

sh: 1: /usr/sbin/sendmail: not found Error sending email Failed to send mail with php mail. ErrorPhpMailDelivery
the script is this:
https://doxygen.dolibarr.org/d5/d01/email__unpaid__invoices__to__customers_8php_source.html
What could be the problem?

Hi,

Most probably a problem of rights of the user that launch the cron job.
Depends on which platrform you are running doly