Answer the question
In order to leave comments, you need to log in
For some reason, the php file is not being processed?
Apache server is up on Ubuntu.
There is a php script that should generate a file. When running it manually, everything works php myScript.php. However, when adding a script to cron, the file is not created, and there are no errors in the logs. File permissions: -rwxrwxrwx.
Command in cron
*/2 * * * * rm -f /var/www/html/php/IBP/Excel_reports/report.xls && php -f /var/www/html/php/IBP/report_DangerFactor.php >> / tmp/cronDanger 2>&1
Answer the question
In order to leave comments, you need to log in
What if you specify the full path?
And you also need to specify the user, you can’t see him here
Something like this:
*/2 * * * * root rm -f /var/www/html/php/IBP/Excel_reports/report.xls && /usr/bin/php -f /var/www/html/php/IBP/report_DangerFactor.php >> /tmp/cronDanger 2>&1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question