Bonjour à toutes et à tous,
J'utilise l'offre : perso (mutualisé)
Je rencontre la problématique suivante :
Lorsque je mets un cron en place depuis ovh, pour exécuter wp-cron.php, tout fonctionne correctement. Mais si je rajoute dans wp-config.php cette ligne :
```
/** Stop du cron WordPress si true, pour éviter de lancer le cron à chaque visite **/
define('DISABLE_WP_CRON', true);
```
J'ai ce message d'erreur dans les logs d'ovh :
```
[2022-06-20 17:43:00] ## OVH ## START - 2022-06-20 17:43:00.081443 executing: /usr/local/php7.4/bin/php /homez.4533/fdsgoin/www/wp-cron.php
[2022-06-20 17:43:00]
[2022-06-20 17:43:00] ## OVH ## END - 2022-06-20 17:43:01.094979 exitcode: 0
[2022-06-20 18:42:59] ## OVH ## START - 2022-06-20 18:42:59.229108 executing: /usr/local/php7.4/bin/php /homez.4533/fdsgoin/www/wp-cron.php
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] WordPress » Erreur
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] html {
[2022-06-20 18:42:59] background: #f1f1f1;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] body {
[2022-06-20 18:42:59] background: #fff;
[2022-06-20 18:42:59] border: 1px solid #ccd0d4;
[2022-06-20 18:42:59] color: #444;
[2022-06-20 18:42:59] font-family: -apple-system, BlinkMacSystemFont, « Segoe UI », Roboto, Oxygen-Sans, Ubuntu, Cantarell, « Helvetica Neue », sans-serif;
[2022-06-20 18:42:59] margin: 2em auto;
[2022-06-20 18:42:59] padding: 1em 2em;
[2022-06-20 18:42:59] max-width: 700px;
[2022-06-20 18:42:59] -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
[2022-06-20 18:42:59] box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] h1 {
[2022-06-20 18:42:59] border-bottom: 1px solid #dadada;
[2022-06-20 18:42:59] clear: both;
[2022-06-20 18:42:59] color: #666;
[2022-06-20 18:42:59] font-size: 24px;
[2022-06-20 18:42:59] margin: 30px 0 0 0;
[2022-06-20 18:42:59] padding: 0;
[2022-06-20 18:42:59] padding-bottom: 7px;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] #error-page {
[2022-06-20 18:42:59] margin-top: 50px;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] #error-page p,
[2022-06-20 18:42:59] #error-page .wp-die-message {
[2022-06-20 18:42:59] font-size: 14px;
[2022-06-20 18:42:59] line-height: 1.5;
[2022-06-20 18:42:59] margin: 25px 0 20px;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] #error-page code {
[2022-06-20 18:42:59] font-family: Consolas, Monaco, monospace;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] ul li {
[2022-06-20 18:42:59] margin-bottom: 10px;
[2022-06-20 18:42:59] font-size: 14px ;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] a {
[2022-06-20 18:42:59] color: #0073aa;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] a:hover,
[2022-06-20 18:42:59] a:active {
[2022-06-20 18:42:59] color: #006799;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] a:focus {
[2022-06-20 18:42:59] color: #124964;
[2022-06-20 18:42:59] -webkit-box-shadow:
[2022-06-20 18:42:59] 0 0 0 1px #5b9dd9,
[2022-06-20 18:42:59] 0 0 2px 1px rgba(30, 140, 190, 0.8);
[2022-06-20 18:42:59] box-shadow:
[2022-06-20 18:42:59] 0 0 0 1px #5b9dd9,
[2022-06-20 18:42:59] 0 0 2px 1px rgba(30, 140, 190, 0.8);
[2022-06-20 18:42:59] outline: none;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59] .button {
[2022-06-20 18:42:59] background: #f3f5f6;
[2022-06-20 18:42:59] border: 1px solid #016087;
[2022-06-20 18:42:59] color: #016087;
[2022-06-20 18:42:59] display: inline-block;
[2022-06-20 18:42:59] text-decoration: none;
[2022-06-20 18:42:59] font-size: 13px;
[2022-06-20 18:42:59] line-height: 2;
[2022-06-20 18:42:59] height: 28px;
[2022-06-20 18:42:59] margin: 0;
[2022-06-20 18:42:59] padding: 0 10px 1px;
[2022-06-20 18:42:59] cursor: pointer;
[2022-06-20 18:42:59] -webkit-border-radius: 3px;
[2022-06-20 18:42:59] -webkit-appearance: none;
[2022-06-20 18:42:59] border-radius: 3px;
[2022-06-20 18:42:59] white-space: nowrap;
[2022-06-20 18:42:59] -webkit-box-sizing: border-box;
[2022-06-20 18:42:59] -moz-box-sizing: border-box;
[2022-06-20 18:42:59] box-sizing: border-box;
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] vertical-align: top;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] .button.button-large {
[2022-06-20 18:42:59] line-height: 2.30769231;
[2022-06-20 18:42:59] min-height: 32px;
[2022-06-20 18:42:59] padding: 0 12px;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] .button:hover,
[2022-06-20 18:42:59] .button:focus {
[2022-06-20 18:42:59] background: #f1f1f1;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] .button:focus {
[2022-06-20 18:42:59] background: #f3f5f6;
[2022-06-20 18:42:59] border-color: #007cba;
[2022-06-20 18:42:59] -webkit-box-shadow: 0 0 0 1px #007cba;
[2022-06-20 18:42:59] box-shadow: 0 0 0 1px #007cba;
[2022-06-20 18:42:59] color: #016087;
[2022-06-20 18:42:59] outline: 2px solid transparent;
[2022-06-20 18:42:59] outline-offset: 0;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] .button:active {
[2022-06-20 18:42:59] background: #f3f5f6;
[2022-06-20 18:42:59] border-color: #7e8993;
[2022-06-20 18:42:59] -webkit-box-shadow: none;
[2022-06-20 18:42:59] box-shadow: none;
[2022-06-20 18:42:59] }
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
Il y a eu une erreur critique sur ce site.
[2022-06-20 18:42:59]
[2022-06-20 18:42:59]
[2022-06-20 18:42:59] ## OVH ## END - 2022-06-20 18:43:05.494998 exitcode: 255
```
Cela fonctionne, ça désactive bien les lancements de cron lors des visites du site, mais je ne comprends pas pourquoi ça fait planter le cron de ovh.
Si j'enlève cette ligne, j'ai bien dans les logs un cron qui s'exécute correctement :
```
[2022-06-20 19:43:00] ## OVH ## START - 2022-06-20 19:43:00.210417 executing: /usr/local/php7.4/bin/php /homez.4533/fdsgoin/www/wp-cron.php
[2022-06-20 19:43:00]
[2022-06-20 19:43:00] ## OVH ## END - 2022-06-20 19:43:01.364862 exitcode: 0
```
Je ne comprends pas pourquoi,
Merci de votre aide.