-->
Welcome, Guest
Username: Password: Remember me

TOPIC: CronJob run php command

CronJob run php command 2 months 2 weeks ago #34472

  • hypebit
  • hypebit's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 4
  • Karma: 0
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
The administrator has disabled public write access.

CronJob run php command 2 months 2 weeks ago #34474

  • ksar
  • ksar's Avatar
  • OFFLINE
  • Senior
  • Posts: 73
  • Thank you received: 32
  • Karma: 4
Hi,

php doesn't find the file.
You need to put the complete path
The administrator has disabled public write access.
The following user(s) said Thank You: hypebit

CronJob run php command 2 months 2 weeks ago #34476

  • hypebit
  • hypebit's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 4
  • Karma: 0
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?
The administrator has disabled public write access.

CronJob run php command 2 months 2 weeks ago #34477

  • ksar
  • ksar's Avatar
  • OFFLINE
  • Senior
  • Posts: 73
  • Thank you received: 32
  • Karma: 4
Hi,

Most probably a problem of rights of the user that launch the cron job.
Depends on which platrform you are running doly
The administrator has disabled public write access.
Time to create page: 0.085 seconds