Skip to main content

CloudLinux Knowledge Base

Running PHP from cronjob

Comments

1 comment

  • Bob Lindner

    Under EasyApache4, using /usr/local/bin/php will still run the PHP script using the default/native version of PHP.  If the account is using PHP Selector and has PHP 7.2 selected (for example) but the Native version on the cPanel server is set to 5.6, then the customer will be running 5.6 on their crons.  To fix this, the customer should, instead, use the full path to the alt-php version... in this case, they would set their cron to:  "/opt/alt/php72/usr/bin/php somescript.php"

    0

Please sign in to leave a comment.