O
O
Oleg Krivchenko2018-12-27 06:52:07
linux
Oleg Krivchenko, 2018-12-27 06:52:07

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

1 answer(s)
A
Alexey Golobokov, 2018-12-27
@AVG75

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 question

Ask a Question

731 491 924 answers to any question