Trying to run cron tasks using 0 */1 * * * root curl -s http://site.name/cron.php?cron_key=secret_key >> /var/log/site-cron.log 2>&1
or 0 */1 * * * root wget -O - -q -t 1 http://site.name/cron.php?cron_key=secretkey >> /var/log/site-cron.log 2>&1
doesn't work.
Using 0 */1 * * * root curl -s http://site.name/cron.php?cron_key=secret_key >> /var/log/site-cron.log 2>&1
and 2 */1 * * * root curl -s http://site.name/cron.php?cron_key=secret_key >> /var/log/site-cron.log 2>&1
, the second attempt works.
Access log shows both calls, but dblog shows only the second attempt. There are no errors in nginx log, cron log, php-fpm log.
How do I fix this?
UPD: thanks @zhilevan. I was able to debug cron scripts with his help. This way drush --root=/usr/share/nginx/demo --quiet cron
displays errors in cron scripts.