Caros,
Estou com problemas na execução do cron pelo crontab da KingHost. Consigo rodar o script normalmente pela web (meusite/moodle/admin/cron.php), mas quando o script é ativado pelo crontab, o log apresenta o erro "HTTP/1.1 404 Not Found" ao chamar o /admin/cli/cron.php. Verifiquei o diretório pelo FileZilla e o script está lá.
Estou preparando o site para lançar meu primeiro curso e, por enquanto, não é problema executar o cron pelo navegador, mas preciso resolver isso antes de disponibilizar o curso.
Versão do Moodle: Moodle 3.8+ (Build: 20191122).
Log do crontab:
Lendo logs de pensandoeducacao.com.br
(atualizado a cada 20s)
Thu, 12 Dec 2019 19:38:08 -0300 - success : 63563.log:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to www.pensandoeducacao.com.br port 443 (#0)
* Trying 10.17.70.170...
* Connected to www.pensandoeducacao.com.br (10.17.70.170) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=pensandoeducacao.com.br
* start date: Nov 23 17:04:16 2019 GMT
* expire date: Feb 21 17:04:16 2020 GMT
* common name: pensandoeducacao.com.br
* issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
> GET /admin/cli/cron.php HTTP/1.1
> User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Cronjob)
> Host: www.pensandoeducacao.com.br
> Accept: */*
> X-Cron-Auth:1fe0545319445e02d1f6f1c50a78d77a
>
< HTTP/1.1 404 Not Found
< Date: Thu, 12 Dec 2019 22:03:01 GMT
< Server: Apache
< Upgrade: h2
< Connection: Upgrade
< Last-Modified: Mon, 07 Apr 2008 14:28:35 GMT
< ETag: "1e8-44a49486ccac0"
< Accept-Ranges: bytes
< Content-Length: 488
< Content-Type: text/html
<
{ [data not shown]
100 488 100 488 0 0 369 0 0:00:01 0:00:01 --:--:-- 369
100 488 100 488 0 0 369 0 0:00:01 0:00:01 --:--:-- 369
* Connection #0 to host www.pensandoeducacao.com.br left intact
<html>
<head>
<meta http-equiv="Content-Language" content="pt-br">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Página Não Encontrada</title>
</head>
<body>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b><font face="Arial" size="3">Erro 404</font></b></p>
<p align="center"><font face="MS Sans Serif" size="2">Página não encontrada</font></p>
</body>
</html>