tsoHost Help Centre

Table of Contents

PHP in Cron

Updated May 18th, 2021 at 10:04 BST

In a cron job, when you want to execute a PHP script, you would often use the php command. On the Cloud however, we provide various versions of PHP (5.6 - 7.*), meaning you need to specify which version you want to execute your cron job with. If you just use php your code will be executed by PHP 5.6.

The version binaries are:

PHP 5.6: /usr/bin/php-5.6

PHP 7.0: /usr/bin/php-7.0

PHP 7.1: /usr/bin/php-7.1

PHP 7.2: /usr/bin/php-7.2

PHP 7.3: /usr/bin/php-7.3

PHP 7.4: /usr/bin/php-7.4