2dareis2do
Basic Pleskian
- Server operating system version
- CentOS
- Plesk version and microupdate number
- 18.0.62 Update #2
When running crontab as user, it is sometimes useful to be able to set or override the path
Here is an example
MAILTO="[email protected]"
SHELL="/bin/sh"
PATH=/usr/local/bin:$PATH
45 * * * * /opt/plesk/php/8.3/bin/php -f '/var/www/vhosts/mydomain/httpdocs/vendor/bin/drush' -- 'core:cron'
In this example I need to add the usr/local/bin to $PATH so that it can run the correct python version that is installed in /usr/local/bin
From admin Ui there is no way to set path unless editing with crontab -e
See How to get CRON to call in the correct PATHs for more info
Screenshot
Here is an example
MAILTO="[email protected]"
SHELL="/bin/sh"
PATH=/usr/local/bin:$PATH
45 * * * * /opt/plesk/php/8.3/bin/php -f '/var/www/vhosts/mydomain/httpdocs/vendor/bin/drush' -- 'core:cron'
In this example I need to add the usr/local/bin to $PATH so that it can run the correct python version that is installed in /usr/local/bin
From admin Ui there is no way to set path unless editing with crontab -e
See How to get CRON to call in the correct PATHs for more info
Screenshot