I love how it's possible to specify the PHP version when running a cronjob, e.g.:

php8.0 myscript.php

However, it's easy to forget to update the cronjobs when the site's PHP version is updated. So would it be possible for the {SITE_PHP_VERSION} variable to work in cronjobs? e.g.:

{SITE_PHP_VERSION} mysite.php

·
·

I would love to support this kind of thing, but the issue here is that the variable gets replaced with the PHP version, and then gets placed on your server inside the /etc/crontab file, and we'd have no way to replace that because {SITE_PHP_VERSION} doesn't really mean anything to the server.

The only thing I can think of is some kind of aliasing system.

no votes yet

Allow {SITE_PHP_VERSION} variable in cronjob commands

1 total vote