K
K
khodos_dmitry2021-02-16 20:56:20
PHP
khodos_dmitry, 2021-02-16 20:56:20

Why php script is not run via CRON?

The script works in the console. Cron also works, runs other scripts.
The logs have the following entries:

Feb 16 17:40:01 s1411 CROND[3145715]: (book) CMD (php /var/www/book/data/www/book.org/ecc/compress/main_new.php)
Feb 16 17:40:01 s1411 CROND[3145719]: (root) CMD (/usr/local/mgr5/sbin/cron-ispmgr sbin/mgrctl -m ispmgr problems.autosolve >/dev/null 2>&1)
Feb 16 17:40:01 s1411 CROND[3145721]: (root) CMD (/usr/local/mgr5/sbin/cron-core sbin/mgrctl -m core problems.autosolve >/dev/null 2>&1)
Feb 16 17:40:01 s1411 CROND[3145718]: (root) CMD (/usr/local/mgr5/sbin/cron-core sbin/mgrctl -m core sysinfostat >/dev/null 2>&1)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-02-16
@galaxy

Specify the full path to php first. And write logs

/usr/bin/php /var/www/book/data/www/book.org/ecc/compress/main_new.php >> /path/to/log 2>&1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question