CONOCEDGEBASE · MEDIO PHP
Cómo configurar o forzar empleos de Cron para utilizar una versión de PHP
Última actualización 2023-04-07
In all but our oldest servers, we have implemented a feature that allows you to set a version of PHP you want to use on your account. However, cron jobs running on a server will normally use the PHP version set for the server, and not the one specified by the PHP version tool. If your cron job needs to run with a different version of PHP, then you will need to specify it in your cron job command or script.
El código de comandos para el cronjob de muestra se mostrará a continuación utilizando el sistema PHP versión set para el servidor:
php -q /home/userna5/public_html/crondir/cronscript.php
Para ejecutar el cronjob de muestra utilizando una línea de versión PHP específica, diga la versión 7.4 de PHP disponible a través de 'Seleccionar una versión PHP' o Selector de PHP, cambie el comando a
/opt/alt/php74/usr/bin/php -q /home/userna5/public_html/crondir/cronscript.php
Para ejecutar el cron usando PHP 5.6 en su lugar, sustitúyase el 74 en /opt/alt/php74/usr/bin/php con 56 para formatear el cron de la muestra como
/opt/alt/php56/usr/bin/php -q /home/userna5/public_html/crondir/cronscript.php
Díganos qué tiene que estar levantado.
A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.